namespace ParameterizedConstructorExample {
Account(String name, int accountNumber,String accountType)
this.accountNumber = accountNumber;
this.accountType = accountType;
public static void Main()
Account customer1 = new Account("XXXX", 767986501,"Saving");
Console.WriteLine("Account name = " + customer1.name +
"\nAccountNumber = " + customer1.accountNumber +
"\nAccount type = " + customer1.accountType);
Console.WriteLine("----------------------------");
Account customer2 = new Account("YYYYYY", 001536707,"Current");
Console.WriteLine("Account name = " + customer1.name +
"\nAccountNumber = " + customer1.accountNumber +
"\nAccount type = " + customer1.accountType);