看的书的是《c#入门经典》
#region Using directivesusing System;
using System.Collections.Generic;
using System.Text;#endregionnamespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// Output text to the screen
Console.WriteLine("The first app in Beginning C# Programming!");
Console.ReadKey();
}
}
}
执行的时候,提示console.Readkey() 有错误,VS2005的环境。
我都是按照书的提示做的,一开始设的是visual c#开发设置,
这是哪里的问题呢?一开始就一头雾水。
#region Using directivesusing System;
using System.Collections.Generic;
using System.Text;#endregionnamespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
// Output text to the screen
Console.WriteLine("The first app in Beginning C# Programming!");
Console.ReadKey();
}
}
}
执行的时候,提示console.Readkey() 有错误,VS2005的环境。
我都是按照书的提示做的,一开始设的是visual c#开发设置,
这是哪里的问题呢?一开始就一头雾水。
解决方案 »
- 求指点个人对三层架构理解
- C#多线程入门问题, 求助哈~~~~
- 代码中使用SQL Server CTE超时
- EXCEPTION:ora-01008:not all variable bound--求解
- 怎么样将数字格式化为特定的长度?
- 哪有NET版式网上系统下载
- 如何在DataGrid里绑定一个字段,然后让他连接另一个页面,是个小窗体的。
- 在C#中怎样把一幅256*256的raw图像读进一个二维数组(在VC中实现如下)?
- C#窗体的控件根据不同分辨率的改变而改变
- 怎样在两个Web页中传送变量(给分)
- 关于邮件的解码问题,RETR,POP3,邮件,附件,解码,邮件接收
- 动态域名解析服务器与客户端 设计思路
在Console.ReadKey();
处提示
未处理的InvalidOperationException
如果应用程序没有控制台或控制台输入已通过文件进行了重定向,则无法读取键。请尝试使用Console.Read.
(我用的csc直接编译的)
第一次接触C#,搞错了,选模板的时候我选的是windows应用程序,应该选控制台应用程序。