public override string ToString() { string result = "Bank Account details:\n"; result += "---------------------\n"; result += string.Format("Accout number: {0}\n", AccountNumber); //...... result += BankAdress.ToString() + '\n'; return(result); }
public override string ToString() { string result = "\nBank Account details:\n"; result += "---------------------\n"; result += string.Format("Bank name:{0}\n", BankName); result += string.Format("Branch number:{0}\n", BranchNumber); result += string.Format("Accout number: {0}\n", AccountNumber); result += string.Format("Balance: {0}\n", Balance); result += BankAdress.ToString() + '\n'; return(result); }