public void LoadData() { FileStream fs = new FileStream(path, FileMode.Open, FileAccess.Read); MyUniver = (MyUniver)bf.Deserialize(fs); fs.Close(); }
public DataManager() { path = @"..\..\Data\univer.dat"; MyUniver = new MyUniver(); bf = new BinaryFormatter(); //InitData(); //SaveData(); LoadData(); }