This code does not seem to compile, I just need to write something to a small log text file (a new row to end of file).
<%@ Import Namespace='System.IO' %> void Page_Load( object sender, EventArgs e ){ FileSystem myFileSystem = new FileSystem(); myFileSystem.WriteAllText(logFile, hash, false);
I can’t see any class called FileSystem in the
System.IOnamespace. Is this something new in .NET 4.0 which you’re trying to use?Note that the
Fileclass has a static method calledWriteAllText. Is that what you meant?EDIT: To append to a file instead, use
File.AppendAllText.