private void SetMembers(TripGroup tripGroup, int count) { Member member; for (int i = 0; i < count; i++) { member = new Member(); SetExpenses(member, int.Parse(_sr.ReadLine())); tripGroup.AddMember(member); } }
private void SetTripGroup() { string line = string.Empty; TripGroup tripGroup; line = _sr.ReadLine(); do { tripGroup = new TripGroup(); SetMembers(tripGroup, int.Parse(line)); line = _sr.ReadLine(); _tripGroups.Add(tripGroup); } while (line != null && line != "0"); _sr.Close(); }