Okay I have spent an inordinate amount of time trying to solve what the posts i've read say is a simple fix.
I want to write to a file in my documents and here is my code.
string st = @"C:\Users\<NAME>\Documents\Sample1.txt";
System.IO.StreamWriter file = new System.IO.StreamWriter(st);
file.WriteLine(Convert.ToString(Sample1[0]));
file.Close();
Where is the user name. I am getting the following error
"A first chance exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.ni.dll. An exception of type 'System.IO.DirectoryNotFoundException' occurred in mscorlib.ni.dll but was not handled in user code"
I am using Visual Studio Express for Windows Phone Development.
If anyone can point out what i am doing wrong i would be grateful.
Thanks.
DirectoryNotFoundException... does the directory exist on the phone?