namespace Test_User_Account
{
/// <summary>
/// 账户类
/// </summary>
public class User
{
public string _name;
public string _identityNum;
public string _password;
public double _balance;
public string _account;
}
///<summary>
///银行类
///</summary>
public class Bank
{
///<summary>
///开户
///</summary>
public void ShowCustomMenu()
{
string option = "";
do
{
System.Console.WriteLine("=============欢迎使用自动银行服务=============");
System.Console.WriteLine("1:存款 2:取款 3:转账 4:查询余额 5:退出");
System.Console.WriteLine("=======================================");
option = System.Console.ReadLine();
switch (option)
{
case "1":
CreateAccount();
continue;
case "2":
continue;
case "3":
case "4":
case "5":
break;
default:
System.Console.WriteLine("[输入无效]");
continue;
}
break;
}while(true);
}
public void CreateAccount()
{
User user = new User();
Initial();
System.Console.WriteLine("请输入账号姓名");
user._name = System.Console.ReadLine();
user._account = "179708064356";
System.Console.WriteLine("请输入账号密码");
user._password = System.Console.ReadLine();
System.Console.WriteLine("请输入账号身份证号:");
user._identityNum = System.Console.ReadLine();
System.Console.WriteLine("请输入账户存款金额");
user._balance = double.Parse(System.Console.ReadLine());
foreach(User a in _userGroup)
{