Convert System.IO.FileStream to System.IO.Stream

View: New views
1 Messages — Rating Filter:   Alert me  

Convert System.IO.FileStream to System.IO.Stream

by spector00 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This is perhaps not the best place for this question but i know that mono is a rewrite of the entire .net. Maybe you guys might know the answer to this question.
I plan to be able to send any object whos base is System.IO.Stream so i can work with it in the function.

/*
public static 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);   //<-- I get error of compilation how can I fix this?
*/