private static void WriteIndex(SaveGameIndex index) { var formatter = CreateFormatter(); using (var stream = new MemoryStream()) { formatter.Serialize(stream, index); Folder.WriteFile(IndexFile, stream.ToArray()); } }