public CustomList Merge(CustomList lst, CustomDeque dq) { CustomList result = new CustomList(); foreach (var obj in lst.GetList()) { result.AddElement(obj); } foreach (var obj in dq.GetDeque()) { result.AddElement(obj); } return(result); }
public CustomDeque OutputToDeque(String brand) { List <SmartPhone> temp = FindByBrand(brand); CustomDeque result = new CustomDeque(); if (temp.Count() != 0) { foreach (var obj in temp) { result.AddElement(obj); this.list.Remove(obj); } } else { Console.WriteLine("Nothing Found!"); } return(result); }