varsha

varsha

  • NA
  • 46
  • 6.2k

error while reading file

Nov 13 2017 5:24 AM
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)