2016年11月3日 星期四

C# 學習01 簡單Console輸出



圖一、Console

筆記

第一行包含註解。 字元 // 可以將這行的後面部分轉換成註解。
// A Hello World! program in C#.
您也可以藉由將文字區塊封入 /* 和 */ 字元,將該文字區塊標記為註解。 這在下列範例中顯示。
/* A "Hello World!" program in C#.
This program displays the string "Hello World!" on the screen. */ 
 
 

Main 方法

對於任一種傳回類型,都可使用引數。
static void Main(string[] args)
{
    //...
}
 

輸入和輸出

  using System;
Console.WriteLine("Hello World!");

 

 

 

沒有留言:

張貼留言