المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Convert System.IO.FileStream to System.IO.Stream [modified]



C# Programming
11-04-2009, 04:11 PM
I wish to know is there a way that I can send any clase that uses the System.IO.Stream base to a function.

public void Display(System.IO.Stream _data)
{...}

System.IO.FileStream _file=System.IO.File.Open(_FileName.ToString(), System.IO.FileMode.OpenOrCreate, System.IO.FileAccess.ReadWrite, System.IO.FileShare.ReadWrite);

Display(_file);