假設hello.cs檔案放在d:

指令:
csc /out:d:\hello.exe d:\hello.cs

out:第一個路徑是指檔案編譯要輸出到哪,第二個路徑是指原本檔案放在哪。

 

程式碼:

 using System;
 
    public class Hello
    {
        public static void Main()
        {
            Console.WriteLine("Hello World !!");
        }
    }

創作者介紹
創作者 隨手筆記 的頭像
芭樂養樂多

隨手筆記

芭樂養樂多 發表在 痞客邦 留言(0) 人氣( 18 )