5
Reply

error while reading file

varsha

varsha

Nov 13 2017 5:24 AM
133
I am unable to read the text file in windows form . i am getting the following error
 
An unhandled exception of type 'System.NotSupportedException' occurred in mscorlib.dll
 
Additional information: The given path's format is not supported.
 
I had written like this:
 
String^ strfilename = openFileDialog1->InitialDirectory + openFileDialog1 + filename;
String^ readfile = File::ReadAllText(strfilename);
 
can anyone tell me what I could do 

Answers (5)