Main Site Documentation

Cannot create an instance of FileStream class


#1

Hi,

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 ?

Thanks
Tom


#2

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


#3

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:


#4

Yes, it’s in reference System.IO


#5

Hi all,

Thanks for the very quick response !

Implementation is in System.IO reference.

Cheers,
Tom