public void Write(string file) { using (var stream = File.Create(file)) { Write(new BuildingParameters(new BinaryStreamWriter(stream))); } }