ATMLModelLibrary.model.equipment.Controller.SaveToFile C# (CSharp) Method

SaveToFile() public method

public SaveToFile ( string fileName ) : void
fileName string
return void
        public virtual void SaveToFile(string fileName)
        {
            System.IO.StreamWriter streamWriter = null;
            try
            {
                string xmlString = Serialize();
                System.IO.FileInfo xmlFile = new System.IO.FileInfo(fileName);
                streamWriter = xmlFile.CreateText();
                streamWriter.WriteLine(xmlString);
                streamWriter.Close();
            }
            finally
            {
                if ((streamWriter != null))
                {
                    streamWriter.Dispose();
                }
            }
        }
        

Same methods

Controller::SaveToFile ( string fileName, System &exception ) : bool