Unity iPhone - StreamReader.EndOfStream Not Working?

Hi all,

I get the following error in Unity iPhone when I try and check for the end of a stream using the following code:

StreamReader sr = new StreamReader(filename);
while (!sr.EndOfStream)
    // My Loop

System.IO.StreamReader' does not contain a definition for `EndOfStream'

In MonoDevelop code complete suggests that I have access to sr.EndOfStream as a valid property returning a bool...

Any help greatly appreciated!



If you're using the .NET 2.* profile, it looks like it's a bug - If you're using the earlier 1.* profile, then it's because it wasn't added until .NET 2.0