今天我决定静下心来,好好的看一下C#。先写一段Hello,World先。
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.Write("hello,C#");
}
}
}
写完,F5,黑屏闪了一下以后就关闭了。我还没看清楚是什么内容。
以前在写C的时候,可以在后面加一个getChar()
浏览了一下文档,终于找到解决的方法了。加个Console.ReadLine();
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Console.Write("hello,C#");
Console.ReadLine();
}
}
}
写完,F5,真的可以,嘻嘻。