Chris

Chris

  • NA
  • 11
  • 0

How to load an xml file that is in same project?

Nov 17 2006 1:44 PM
How to load an xml file that is in same project? Hey guys, I am new to winforms so please forgive me. I am trying to write to an xml file that I created. The file is in the same project (in the root level of the project, not hidden away in sub folders). However, it bombs out when it tries to find the xml file: Here's the error: {System.IO.FileNotFoundException: Could not find file 'S:\source\cs\sTopGun\CSharp\sBriefcase\BriefcaseSyncNotifier\bin\Debug\SyncSettings.xml Here's my code so far: DataSet xmlDataSet = new DataSet(); StreamReader myStreamReader = new StreamReader("SyncSettings.xml"); xmlDataSet.ReadXml(myStreamReader); myStreamReader.Close(); Thanks for the help!!!

Answers (2)