Console.Clear();
完整程序如下:
static void Main(string[] args)
{
Console.WriteLine("Welcome!Please Input your name:");
string strName = Console.ReadLine();
Console.Clear();
Console.WriteLine("Your Name is:" + strName);
Console.ReadKey();
}
这是编译器后台的设置问题,与程序设计无关,
static void Main(string[] args)
{
Console.WriteLine("Welcome!Please Input your name:");
string strName = Console.ReadLine();
Console.Clear();
Console.WriteLine("Your Name is:" + strName);
Console.ReadKey();
}
你将textbox控件的属性Textmode设置为password就可以了
输入一次清屏一次