Notepad fix the first C # program
Perform the following three steps: Encode, compile, and run the host.
1. Notepad to encode:
Using System;
Class Program
{
public static void Main ()
{
Console.WriteLine ("Hello world!");
Console.ReadLine ();
}
}
2. Compile (under the window of the C drive, locate Microsoft.NET, which indicates that the. Framework framework is installed).
Open a Command Prompt window, enter cmd, locate C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe, and go to the directory CD C:\Windows\Microsoft.NET\ framework\v4.0.30319, performing Csc.exe/out:d:\hello.exe D:\hello.cs
3. Managed operation
After compiling, generate Hello.exe, directly click for managed run.
Profiling the compilation process:
Encoding--->c# language compiler---->msil Microsoft intermediate Language with an assembly. Exe,.dll exists--->clr,jil instant compiler----> machine code---->CLR managed Run
|------------------------------compile-time----------------------------------|--------------------- Run-time-------------------------------|
The first part of Notepad to fix the first C # program