AjaxControlToolkit.Reference.Core.Documentation.LoadXml C# (CSharp) 메소드

LoadXml() 정적인 개인적인 메소드

static private LoadXml ( string fileName ) : System.Xml.Linq.XDocument
fileName string
리턴 System.Xml.Linq.XDocument
        static XDocument LoadXml(string fileName)
        {
            XDocument xml;
            if(!File.Exists(fileName))
                throw new ArgumentException(String.Format("File '{0}' not found", fileName), "fileName");

            xml = XDocument.Load(fileName);
            if(xml == null)
                throw new ArgumentException(String.Format("Unable to load XML from '{0}'", fileName), "fileName");

            return xml;
        }