输入输出格式错误

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

                Console.WriteLine("占位符中不能有空格:{0}", 1); //对
                Console.WriteLine("占位符中不能有空格:{0 }", 1);//对
                Console.WriteLine("占位符中不能有空格:{ 0}", 1);//错,左边不能有空格
posted @ 2012-06-09 16:37  金河  阅读(231)  评论(0编辑  收藏  举报