`
tntxia
  • 浏览: 1523941 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

看C#随笔

阅读更多

今天我决定静下心来,好好的看一下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,真的可以,嘻嘻。

分享到:
评论
1 楼 netlynx206 2008-07-18  
C#吸取了JAVA的优点,弥补了JAVA的不足,很不错

相关推荐

Global site tag (gtag.js) - Google Analytics