各位高手,请教怎样把密码加上****号啊!~~
using System;using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace forth
{
class Secret
{
public static void PassWord()
{
back:
Console.WriteLine("***欢迎进入用户登陆系统***\n");
Console.WriteLine("请输入用户名:");
string a = Console.ReadLine();
Console.WriteLine("请输入用户密码:");
string b = Console.ReadLine();
if (a == "abc" && b == "123")
{
Console.Clear();
Console.WriteLine("\t输入正确!~~");
Console.WriteLine ();
}
else
{
Console.WriteLine();
Console.WriteLine("您输入的用户名或密码错误!~~");
Console.WriteLine(" 请重新输入!~~");
Console.WriteLine();
goto back;
}
}
}
}