public static void SavePropertiesToFile(object instance, string fileName) { FileStream fileStream = File.Create(fileName); StreamWriter streamWriter = new StreamWriter(fileStream); InstanceIO.SavePropertiesToStream(instance, streamWriter); streamWriter.Close(); fileStream.Close(); }
public void SavePropertiesToStream(StreamWriter streamWriter) { InstanceIO.SavePropertiesToStream(this, streamWriter); }