/*=========================================================== * Autho Study : Hehf * Time: 2009 * Type: Console Application ===========================================================*/ //using System; using System.Collections.Generic; using System.Text; namespace TextHello { class Program { static void Main(string[] args) { //输出Hello World,注意上面注释掉了引用System System.Console.WriteLine("Hello World"); //等待按键 System.Console.ReadLine(); } } } /*=========================================================== * Autho Study : Hehf * Time: 2009 * Type: Form Application ===========================================================*/ using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WinFormHello { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void ok_Click(object sender, EventArgs e) { MessageBox.Show("Hello " + userName.Text); } } }