CSMSL.IO.MzML.ProcessingMethodType.LoadFromFile C# (CSharp) Method

LoadFromFile() public static method

public static LoadFromFile ( string fileName ) : ProcessingMethodType
fileName string
return ProcessingMethodType
        public static ProcessingMethodType LoadFromFile(string fileName)
        {
            System.IO.FileStream file = null;
            System.IO.StreamReader sr = null;
            try
            {
                file = new System.IO.FileStream(fileName, FileMode.Open, FileAccess.Read);
                sr = new System.IO.StreamReader(file);
                string xmlString = sr.ReadToEnd();
                sr.Close();
                file.Close();
                return Deserialize(xmlString);
            }
            finally
            {
                if ((file != null))
                {
                    file.Dispose();
                }
                if ((sr != null))
                {
                    sr.Dispose();
                }
            }
        }

Same methods

ProcessingMethodType::LoadFromFile ( string fileName, ProcessingMethodType &obj ) : bool
ProcessingMethodType::LoadFromFile ( string fileName, ProcessingMethodType &obj, System &exception ) : bool