I\'m loading an XML document in my C# application with the following:
XDocument xd1 = new XDocument(); xd1 = XDocument.Load(myfile);
but be
Just load it and catch the exception. Same for File.Exists() - the file system is volatile so just because File.Exists() returns true doesn't mean you'll be able to open it.
File.Exists()