public static void SaveProgress() { FileStream MyStream1 = new FileStream("C:\\Users\\" + Environment.UserName + "\\Desktop\\data1.dat", FileMode.OpenOrCreate); BinaryFormatter MyFormatter = new BinaryFormatter(); int zmienna1 = progress.getProgress(); int zmienna2 = progress.getLevel(); bool zmienna3 = GetLearnType(); MyFormatter.Serialize(MyStream1, zmienna1); MyFormatter.Serialize(MyStream1, zmienna2); MyFormatter.Serialize(MyStream1, zmienna3); MyStream1.Close(); }