Paul Lemelle said:
I am using C#, and here is the code:
using system;
using system.IO;
namespace FileIO
Class File
{
public static void Main ()
{
string myfile = File.ReadAllText("myfile");
// I do not get the File.ReadAllText - I only get Equals, Main,
// & ReferenceEquals after File.
Console.Writeline(myfile);
}
}
That's certainly not the code you had mostly working - it's really
helpful if you cut and paste the *actual* code in, rather than creating
a *similar* program which will fail for other reasons. Problems with
the above, *apart* from the collision of the "File" name:
1) Case of "system"
2) No braces after the namespace declaration
3) Case of class declaration
4) Case of the "l" in Writeline
In general, if you've already got a problem in your code, it makes it
hard for us to tell the problems which are *really* there compared with
typos when retyping the code unless you use cut and paste properly.