public static void Write(BalancedNumber data, string denominator) { if (!Directory.Exists(basePath)) { Directory.CreateDirectory(basePath); } using (BinaryWriter writer = new BinaryWriter(File.Open(basePath + denominator + ".savedata", FileMode.Create))) { data.WriteToBinaryStream(writer); } }
public static void Write(BalancedNumber data, BinaryWriter writer) { data.WriteToBinaryStream(writer); }