输入输出格式错误

  1 使用Console输出时有时出现格式错误,下面是一个易错点:

                Console.WriteLine("占位符中不能有空格:{0}", 1); //对
                Console.WriteLine("占位符中不能有空格:{0 }", 1);//对
                Console.WriteLine("占位符中不能有空格:{ 0}", 1);//错,左边不能有空格
posted @ 2012-06-09 16:37  大数据工程师康爸  阅读(257)  评论(0)    收藏  举报