コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }