I can't see what Ive done wrong with the following, would someone help
please.
I'm trying to read rich text from a file. Ive tested the file using a hex
editor and the contents have been written correctly. When i read back the
file, the result is returned as the file name and not the file contents!!
_BodyFilename is defined by Path.GetTempFileName()
thanks :)
(visual studio 2005 on XP pro)
string result = "";
if (File.Exists(_BodyFilename))
{
StreamReader sr = new StreamReader(_BodyFilename);
try
{
result = sr.ReadToEnd();
}
finally
{
sr.Close();
}
}
return result;