コード例 #1
0
ファイル: BinaryFormatter.cs プロジェクト: Ozerich/labs
 protected override Coach ReadCoach()
 {
     Coach coach = new Coach(sr.ReadInt32(), (CoachType)sr.ReadByte());
     int count = sr.ReadInt32();
     for (int i = 0; i < count; i++)
         coach.AddRoom(ReadRoom());
     return coach;
 }
コード例 #2
0
ファイル: TextFormatter.cs プロジェクト: Ozerich/labs
 protected override Coach ReadCoach()
 {
     Coach coach = new Coach(Int32.Parse(sr.ReadLine()), (CoachType)Int32.Parse(sr.ReadLine()));
     int count = Int32.Parse(sr.ReadLine());
     for (int i = 0; i < count; i++)
         coach.AddRoom(ReadRoom());
     return coach;
 }