C # Learning Notes (3)

Source: Internet
Author: User
Tags exception handling garbage collection visual studio linux
Notes

Begin

I graduated from Beijing in June 2000 and went back to Shijiazhuang to start my career. As mentioned earlier, the language I used at first was ASP, which I always thought was not programming, because ASP is not a programming language, and it might be better to call it a dynamic Web implementation technology. In addition, the ASP is very simple, and, simple is all its characteristics-this makes it easy to learn (in the later work, I contacted a lot of candidates, they told me that I am proficient in ASP language). Although it is easy to learn, but in the use of it has to spend a bit more effort: I can still remember the night a person in the Office with VI step-by-step debugging a page of the scene, whenever the failure of setbacks, always think of the tong to make a phone call, listen to her voice. As you know, I always have trouble.

Now you can see that I am not a master, just a low hand ...

June 2000 I graduated from Beijing, back to Shijiazhuang, at the same time (West time, June 22), Microsoft in the United States outside the headquarters of Seattle, the company invited journalists, news analysts and so on about 400 people, held a press conference "Forum2000", announced the official launch. NET plan. The plan includes a new network computing platform (the. Net Framework), a new language (C #), a new development tool (Visual Studio.NET), and an ASP's next version of ASP.net, which is first known as asp+. At that time my main interest in learning is on the ASP.net, and through this window to begin to understand all aspects of microsoft.net.

Asp. NET still cannot be called a programming language, but it can now be viewed as a platform for creating, managing, and deploying Web applications. can use any. NET language to develop Internet applications on this platform, including, of course, C #. The relationship between them can be seen in the following illustration:

This is the famous. NET platform structure, and as you can see from this diagram, ASP.net, Windows forms, and vs.net are just part of the. NET development platform for the development and presentation of. NET Applications. The core technologies of the platform are: the Common language runtime (Clr:common Language Runtime), the base Class library (base classes),. Net language and Visual Studio.NET.


As you can see from this diagram, the. Net Framework is a virtual platform for architecture on the Windows platform, and you can imagine switching the lower windows into other operating systems, such as Linux, that can be implemented using CLS compliant (Common Language specification, Common Language Specification,. Net language (vb.net, C #, JScript.NET, and so on) to create the functionality of ASP.net or Windows Forms (which may be called Linux forms) applications, This is actually the functionality that we are going to implement in the mono program we described earlier. So it can be argued that, theoretically, C # is a Cross-platform language, which is much like Java, and another place like Java is that C # is also a (special) interpretive language. Like Java, C # programming code is compiled into a special byte code (intermediate language, Microsoft intermediate Language,msil) through the C # compiler, and runs through a specific compiler (JIT compiler, Just in Time,jiter) is compiled into machine code for operating system execution.


Not just the C # language, all. NET language (which will include the dozens of modern programming languages we use) can write program code that is intended for the CLR. NET is called managed code (Managed), all Managed code runs directly on the CLR and has platform-independent features.


The explanatory language is safe and can be given more functionality through its running platform, such as automatic memory management, exception handling, and so on. In fact, many of the features of the C # language are provided by the CLR, as illustrated by the following CLR structure diagram.

As you can see, type Checker, garbage collection (garbage Collector), exception handling (Exception Manager), backward compatibility (COM marshaler), multithreaded support (thread Support) These C # features are provided by the CLR. The CLR, the earliest known as the next-generation Windows Service runtime (Ngws Runtime), is a virtual operating environment that is built directly on the operating system layer, and the main function is to manage the operation of the code. In the. NET platform diagram, the CLR is above the base Class library of. NET (base class LIBRARY,BCL), which includes various aspects from basic input output to data access, providing a unified object-oriented, hierarchical, extensible programming interface. As you can see from the. Net platform structure diagram, base class libraries can be invoked and extended in various languages, that is, C #, VB. NET or vc++.net, can be called freely. NET's base Class library. In fact, C # does not have its own class library, and the programming interface it uses is. NET provides a base class library. So, in deciding to use C #, what really takes time to learn is actually. NET Framework base Class Library: C # itself has only 77 keywords, and its syntax is very familiar to many programmers. BCL, on the other hand, contains more than 4,500 classes and countless methods and properties that you might use at any time in your C # program to accomplish your tasks.

Many people have thought about how to start learning a new language, which is not difficult for an experienced programmer. But for someone who doesn't know how to write code, if you start your programming journey in C #, a myriad of concepts and terms may be a bit confusing. At this time please pay attention to your learning order, any programming language learning is in accordance with the running platform, grammar, base class library until the application of the order of the various aspects, but in the actual learning, they are not isolated. The recommended approach is to learn the usage of various base class libraries in the application after a holistic understanding of the operating platform and syntax. Given the specificity of the language of C #, a full understanding of its operating platform (the. Net Framework) will make your study more effective. So keep in mind that the two diagrams mentioned above, in later studies, although may not explicitly involve them, but throughout the C # learning process, they are everywhere.

There is also a very important concept you need to understand, this is the Common Language architecture (Common Language Infrastructure, CLI). The CLI is a subset of the CLR, i.e.. NET, the part that ultimately manages the running environment of an application that is compiled into MSIL code. The CLI is in the lower half of the CLR structure diagram, mainly including the ClassLoader (class Loader), the Just-in-time compiler (IL to Native compilers), and the garbage collector (garbage Collector) of a run-time environment. The CLI is the soul of. NET and the CLR, and the CLI provides an environment for the IL code to run, and you can run code written in any language after it has been converted to MSIL code by its specific compiler, and you can even write the MSIL code on the CLI itself. As you know, the European Computer Manufacturers Association (ECMA) has approved the C # Language Specification (ECMA-334) as a new computer industry standard on October 13, 2001. ISO also agrees that the standard will enter the organization's approval phase. And, as. NET and the central part of the CLR, the CLI and C # also obtained ECMA approval (ECMA-335). With both the C # and CLI standards, you can write your own to run on any operating system. NET platform (as long as you wish). As mentioned earlier, the famous mono project is doing this, and the mono project consists of three core parts: A C # language compiler, a CLI, and a class library. In the Java world, this work is done by Sun, which has developed Java virtual machines for different operating systems to run a Java-developed application on different operating systems, but so far has not heard of Microsoft's intentions ( Provides users with a. NET Platform for non-Windows systems.

2000 June There are a lot of things happen, 2000 June I do in school, evening ran to the department of the test room to see the European Championship, I like the Campujun (Bergkamp) Shine, help Holland 6:1 victory over Yugoslavia, Mihailović (Mihajlovic) The last inexplicable smile in the game remains in my heart forever. To tell the truth, at that time only to see EURO2000, but nothing. Net,. Not. In addition, the parting of the melancholy around everyone around, the radio began to play back and forth some old songs, do not know Why, Love Song 1980 is the favorite.

Later, we all graduated from the industry. As you know, I left Beijing.

>>> not finished, to be continued ...



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.