[You must know. NET] The 13th time: From Hello, World began to know IL

Source: Internet
Author: User

This article describes the following:

Il Code Analysis method

Hello, World History

. NET Learning Methodology

1. Introduction

In 1988, Brian W.kernighan and Dennis M.ritchie co-authored the classic magnum opus "The C Programming Language" in software history, and I recommend that all programs have the opportunity to revisit the classics of history. Since then, Hello, the world example, as the opening code for almost all practical programming books, has continued so far, in addition to expressing respect for Giants and history, this article also begins with Hello, the world example, as a starting point for us to deduct the Il language and begin our step-by-Step il awareness journey.

2. From Hello, World began

The first, of course, is to showcase our Hello, World code and start a useful sharing.

using System;
using System.Data;

public class HelloWorld
{
     public static void Main()
     {
         Console.WriteLine("Hello, world.");
     }
}

This code performs the simplest process of greeting a strange world, then what is the truth behind the high-level language, and here we begin with the IL Code analysis based on the example above.

3.IL Experience Center

Apply the ILDasm.exe decompile tool to the compiled executable HelloWorld.exe, restore the HelloWorld for text MSIL encoding, and as it works we expect to be accounted for in a series of subsequent articles, and we view the screenshot as:

As the above figure shows, the compiled IL structure contains the manifest and HelloWorld classes, where manifest is a list of additional information that includes some attributes of the assembly, such as assembly name, version number, hash algorithm, assembly module, and so on. and a reference to an externally referenced assembly, and the HelloWorld class is the protagonist we're introducing below.

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.