Exemplo n.º 1
0
        public List <MobilePhone> Search(MobilePhone searchPhone)
        {
            List <MobilePhone> matchingPhones = new List <MobilePhone>();

            foreach (MobilePhone phone in mobilePhones)
            {
                if (phone.Equals(searchPhone))
                {
                    matchingPhones.Add(phone);
                }
            }
            return(matchingPhones);
        }
Exemplo n.º 2
0
 public void SavePhone(MobilePhone phone)
 {
     mobilePhones.Add(phone);
 }