public bool Save() { try { if (_license == null) { return(false); } using (StreamWriter sw = File.CreateText(FileName)) { DataCrypto dc = new DataCrypto(); string xmlstr = _license.ToXMLString(); sw.Write(dc.Encrypto(XMLHeader + xmlstr)); //sw.Write(XMLHeader + xmlstr); } _lastError = null; return(true); } catch (Exception err) { _lastError = err; return(false); } }