Console.WriteLine(); 输出字符串
Console.ReadLine(); 读取用户的字符串
Console.Clear(); 清楚以上语句
int m = Console.CursorTop; 查询当前行号
Console.Write("请输入密码:");
string a = "";
for (int i = 0; i < 6; i++)
{
string s = Console.ReadKey(true).Key.ToString();
a += s.Substring(1);
Console.Write("*");
}
Console.WriteLine(a); 用户输入密码为 “********”;
Console.Title = ""; 设置控制台标题
Console.ForegroundColor = ConsoleColor.DarkRed; 设置字体颜色
Console.BackgroundColor = ConsoleColor.Blue; 设置字体块的背景色
Console.WindowHeight = 300; 设置控制台高度
Console.WindowWidth = 200; 设置控制台宽度