public void Save(string filename) { using (FileStream outStream = new FileStream(filename, FileMode.Create)) { MapFormatHelper.WriteToStream(this, outStream); } }
public byte[] ToBytes() { using (MemoryStream memory = new MemoryStream()) { MapFormatHelper.WriteToStream(this, memory); return(memory.ToArray()); } }