Esempio n. 1
0
 public void Add(Presents present)
 {
     if (Capacity > Count)
     {
         data.Add(present);
     }
 }
Esempio n. 2
0
        public Presents GetPresent(string name)
        {
            Presents currentPresent = data.FirstOrDefault(x => x.Name == name);

            return(currentPresent);
        }
Esempio n. 3
0
        public Presents GetHeaviestPresents()
        {
            Presents heaviestPresents = data.OrderByDescending(x => x.Weight).FirstOrDefault();

            return(heaviestPresents);
        }
Esempio n. 4
0
        public bool Remove(string name)
        {
            Presents present = data.FirstOrDefault(x => x.Name == name);

            return(data.Remove(present));
        }