Пример #1
0
        static void Main(string[] args)
        {
            Cust        cu1 = new Cust(108, "Gaurav", "Shillong", 30000);
            Cust        cu2 = new Cust(112, "Priya", "Bhilai", 25000);
            Cust        cu3 = new Cust(300, "Neville", "New York", 58000);
            CustManager mg  = new CustManager();

            mg.AddCust(cu1);
            mg.AddCust(cu2);
            mg.AddCust(cu3);
            mg.ViewAllCust();
            mg.UpdateCust(300);
            mg.ViewAllCust();
            Cust[] temp = mg.FindCust("Gaurav");
            foreach (var item in temp)
            {
                Console.WriteLine(item.CustID);
                Console.WriteLine(item.Name);
                Console.WriteLine(item.Address);
                Console.WriteLine(item.Salary);
            }
        }
Пример #2
0
 public bool AddCust(Cust cu)
 {
     return(custs.Add(cu));
 }