Thinking in Code!

一分耕耘\一分收获。
   相信自己->天道酬勤->把握人生!
                           --小易的BLOG

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

Before moving on, let ’ s summarize the steps required to create a .NET application as discussed
previously:
1. Application code is written using a .NET - compatible language such as C# (see Figure 1 - 1 ).

 
Figure 1-1

 

2. That code is compiled into MSIL, which is stored in an assembly (see Figure 1 - 2 ).

Figure 1-2


3. When this code is executed (either in its own right if it is an executable or when it is used from other code), it must first be compiled into native code using a JIT compiler (see Figure 1 - 3 ).


Figure 1-3


4. The native code is executed in the context of the managed CLR, along with any other running applications or processes, as shown in Figure 1 - 4 .

Figure 1-4

Linking
Note one additional point concerning this process. The C# code that compiles into MSIL in step 2 needn ’ t be contained in a single file. It ’ s possible to split application code across multiple source code files, which are then compiled together into a single assembly. This extremely useful process is known as linking . This is because it is far easier to work with several smaller files than one enormous one. You can separate out logically related code into an individual file so that it can be worked on independently and then practically forgotten about when completed. This also makes it easy to locate specific pieces of code when you need them and enables teams of developers to divide up the programming burden into manageable chunks, whereby individuals can “ check out ” pieces of code to work on without risking damage to otherwise satisfactory sections or sections other people are working on.

posted on 2009-05-13 17:22  Preboy  阅读(206)  评论(0编辑  收藏  举报