The first part of Notepad to fix the first C # program

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.