Exemplo n.º 1
0
 public void Add(List <IRaceGegevensView> list)
 {
     foreach (IRaceGegevensView var in list)
     {
         ParticipantSectionTimes gegevens = (ParticipantSectionTimes)var;
         if (gegevens.Participant == this.Participant && gegevens.Section == this.Section)
         {
             gegevens.SectionTime = this.SectionTime;
             return;
         }
     }
     list.Add(this);
 }
Exemplo n.º 2
0
        public string GetBestParticipant(List <IRaceGegevensView> list)
        {
            ParticipantSectionTimes besteDeelnemer = new ParticipantSectionTimes();

            foreach (IRaceGegevensView var in list)
            {
                ParticipantSectionTimes gegevens = (ParticipantSectionTimes)var;
                if (gegevens.SectionTime < besteDeelnemer.SectionTime)
                {
                    besteDeelnemer = gegevens;
                }
            }

            return($"De driver met de laagste rondetijden is : {besteDeelnemer.Participant.Name}");
        }