ATMLModelLibrary.model.equipment.HardwareItemDescriptionControlDriver.LoadFromFile C# (CSharp) Method

LoadFromFile() public static method

public static LoadFromFile ( string fileName ) : HardwareItemDescriptionControlDriver
fileName string
return HardwareItemDescriptionControlDriver
        public new static HardwareItemDescriptionControlDriver LoadFromFile(string fileName)
        {
            FileStream file = null;
            StreamReader sr = null;
            try
            {
                file = new FileStream(fileName, FileMode.Open, FileAccess.Read);
                sr = new 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

HardwareItemDescriptionControlDriver::LoadFromFile ( string fileName, HardwareItemDescriptionControlDriver &obj ) : bool
HardwareItemDescriptionControlDriver::LoadFromFile ( string fileName, HardwareItemDescriptionControlDriver &obj, Exception &exception ) : bool