📄 createaccount.cs
字号:
using System;
class CreateAccount
{
static void Main()
{
BankAccount berts = NewBankAccount();
Write(berts);
BankAccount freds = NewBankAccount();
Write(freds);
}
static BankAccount NewBankAccount()
{
BankAccount created = new BankAccount();
Console.Write("Enter the account balance! : ");
decimal balance = decimal.Parse(Console.ReadLine());
created.Populate(balance);
return created;
}
static void Write(BankAccount acc)
{
Console.WriteLine("Account number is {0}", acc.Number());
Console.WriteLine("Account balance is {0}", acc.Balance());
Console.WriteLine("Account type is {0}", acc.Type());
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -