public static void Deserialize(string path) { using (Stream fileStream = File.OpenRead(path)) { var br = new BinaryFormatter(); _instance = (Levels)br.Deserialize(fileStream); } }
public static Levels GetInstance() { return _instance ?? (_instance = new Levels()); }