- Home /
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 }
Error: 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!
Thanks
Mat
Answer by Mike 3 · Jun 09, 2010 at 01:34 PM
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
Sorry i'm quite new at all this - how would I know which profile was being used by Unity, or indeed how to change it?
Thanks
$$anonymous$$at
Look at the player preferences. By default it uses .NET 1.1.
Your answer
![](https://koobas.hobune.stream/wayback/20220613061724im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Unity doesn't recognize any definition for Network 1 Answer
Beginner user - nothing will compile in Xcode 2 Answers
Problems Unity to Xcode? 2 Answers
Iphone error Attempting to JIT 1 Answer
Unity Detonator Package error 1 Answer