1 字符串输出
int a=0; int b=1;
Console.WriteLine("b班和a班分别有{1},{0}人{{}}",a,b);
Console.WriteLine("[{0,10}]",a);
输出结果
b班和a班分别有1,0人{}。
[ 0]
{}称为替换标记,里面是数字整数,“”后称为替换值,从0开始计数。\
输出{}号的话,{{}},{0,int} 0号替换值偏移int位字符。
2 字符串读取
Console.ReadLine(); 回车结束
Console.Read() 单个字符