首先來寫個個helloworld吧,代碼很短
[csharp]
namespace helloworld
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello World!"); //將指定的字符串值(後跟當前行終止符)寫入標准輸出流
Console.ReadLine(); //從標准輸入流讀取下一行字符
}
}
}
再來弄個簡單的圖形界面的,實現用戶登錄的提示
[csharp]
namespace Wpfhello
{
/// <summary>
/// MainWindow.xaml 的交互邏輯
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void button1_Click(object sender, RoutedEventArgs e)
{
MessageBox.Show("Welcome," + textname.InputHitTest);
}
}
}