public void userAcc(string regno, string regname, double regdepo, string regpin, char typein) { if (typein == 'N') { cList[totalMember] = new Customer(regno, regname, regdepo, regpin); } else { cList[totalMember] = new SpecialCustomer(regno, regname, regdepo, regpin); } }
public Form1() { InitializeComponent(); cbAccType.Items.Add("Normal"); cbAccType.Items.Add("Special"); cbAccType.SelectedIndex = 0; enLogin(); disKeypad(); disTranf(); cList[0] = new Customer("222222", "Jack", 1999, "222222"); cList[1] = new SpecialCustomer("333333", "Lack", 2000, "333333"); updateTotalCustomer(); readfile(); foreach (var h in cList) { if (h != null) { Console.WriteLine("{0} {1} {2} {3}", h.cName, h.cAccount, h.cPin, h.cBalance); } } }