I've got a short question. I have a class Bank
that needs to have a property with different amounts of constructors.
class Program
{
static void Main(string[] args)
{
Bank ing = new Bank("ing");
int AccountNrName1 = ing.OpenAccount("Name", "LastName", "HouseNumber", "PostalCode");
int AccountNrName2 = ing.OpenAccount("Name", "LastName", "HouseNumber", "PostalCode", Balance, Minimum);
}
The constructor "OpenAccount" has to return both cases (AccountNrName1, AccountNrName2). Here is what I have so far:
public class Bank
{
private string name, lastname, housenumber, postalcode;
private int openaccount;
private int balance;
private int min;
public int OpenAccount(string Name, string LastName, string HouseNumber, string PostalCode, int Balance, int Min)
{
name = Name;
lastname = LastName;
housenumber = HouseNumber;
postalcode = PostalCode;
balance = Balance;
min = Min;
return openaccount;
}
}