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; }
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; }