pszczyg

Untitled

Apr 1st, 2017
194
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public class Training
  2. {
  3.     public Training()
  4.     {
  5.     }
  6.  
  7.     private List<Exercise> _exercises { get; set; }
  8.  
  9.     public void AddExercise(Exercise exercise)
  10.     {
  11.         if(_exercises == null)
  12.             _exercises =new List<Exercise>();_exercises.Add(exercise);
  13.     }
  14.  
  15.     public void AddExercises(IEnumerable<Exercise> exercises)
  16.     {
  17.         foreach (var exercise in exercises)
  18.         {
  19.             AddExercise(exercise);
  20.         }
  21.     }
  22. }
RAW Paste Data