Hi,
I'm trying to link bank accounts to customers that are in a customerlist.
At the moment i have a customerlist which contains the name of the customer and their id.

it is a console application and I have to do it by switch statement cases - and so the case "openaccount" should therefore open an account for the given customer id.

I have a base class and all the different accounts e.g. savings, taxfree etc all inherit from this class.

an example of how my "addcustomer" is shown below:

case "addcustomer":

String name = arguments[1];
bool error2 = false;

foreach (Customers x in customerList)
{
if (name.Equals(x.getName()))
{
Console.WriteLine("Error:" + ErrorCodes.CustomerAlreadyExists);

error2 = true;
}
}

string l= "1";
Convert.ToInt32(l);

if (error2 == false)
{
Customers customer = new Customers(name);
customerList.Add(customer);
Console.WriteLine(customer.GetID());
}
break;

any help would REALLY be appreciated as i have been stuck on this for the past week now.

thanks