Cannot create an instance of FileStream class


I cannot seem to create an instance of the System.IO.FileStream class.

I am porting some code from a Panda to a EMX based module and I have upgraded to .NETMF4.2. After looking through the mscorelib assembly, I cannot find any reference to the FileStream class although it is supposed to be there according to the documentation. The only reference to anything stream related is the abstract base class Stream. Is FileStream implemented somewhere else or am I missing something ?


using System.IO;
public FileStream _iFile;
worked for me.
Regards Roland
And: Welcome to the Forum!

I would say you have to add reference to System.IO or Microsoft.SPOT.IO assembly.
File related assemblies are usually in an IO assembly and namespace.
Sometimes things are hidden in the System assembly too.
The docs of NETMF are often incorrect in what assembly a type is implemented. :frowning:

Yes, it’s in reference System.IO

Hi all,

Thanks for the very quick response !

Implementation is in System.IO reference.