into C # (my C # Learning tour) of the third

Source: Internet
Author: User
Finally came to the second chapter, it is really not easy (hehe, everyone Wulf).

This chapter is generally a general overview of C #. First, by reviewing the previous programming languages (compilations, C/C++,JAVA,VB), emphasizing the links between these languages and C # and C # 's inheritance of the outstanding features of these languages, try to hit the shadow of C # in them. Then the popular programming language and C # are compared to the current market, thus highlighting the importance and superiority of C # as a new generation of programming languages. Then again, the new features of C # (feel the author's nonsense too much). Finally, the application of C # in the development of various programs and the use of C # compiler are briefly introduced.

The general content of this chapter is these, the following in accordance with the order of the sections to see the main contents of each section.

Part of the History of language development

The appearance of assembly language

. NET program does not contain machine instructions, but contains a set of intermediate language instructions that must be interpreted by a run-time program. The intermediate language instruction is more abstract than the assembly language instruction.

The intermediate language looks like an assembly language program with an external command to handle objects.

C Language Section

This part of the main description of C # and C in the same vein. It emphasizes that C # has inherited the powerful functions of C and has despised the difficulty of its use.

VB part

The author points out that VB is congenitally deficient in OOP, but it should be emphasized that the function of C # is perfect and easy to start with VB.

Java section

In this section, first point out the advantages of Java, and then of course, the Java Sea flat. But there are some things to see.

In syntax, Java is very similar to C + +, but there are some differences
(1) Java does not support pointers because pointers are some of the most difficult sources of error in C + + programs. In Java, objects are always handled by reference.
(2) Java does not support operator overloading, because incorrect operator overloading often leads to a lot of confusion, especially for large programs involving multiple developers.
(3) Java is completely object-oriented, that is, all functions must be defined within the scope of the class. Because C + + supports global functions, C + + allows programmers to return their process roots.
(4) Java has an extended hierarchical structure with classes that can be used to handle windows, networks, and other problem domains.
(5) Java recommends that the Declaration and execution of a class be placed in the same file.
(6) The Java runtime provides an unwanted storage unit collection mechanism that prevents memory leaks.

Comparison with other languages

This part of the writing is too disgusting, said basically all is C # good other language bad.

The main points are as follows:
In comparison with VB, the object of C # is higher than VB, which is more concise than VB in syntax.
In comparison with vb.net, it is stated that C # is the preferred language for. Net.
Compared with VC + +, C # is more efficient and easier than C + +.
Demonstrate the platform independence of C # in comparison with C++builder and Delphi.

Let's look at the comparison with Java
(1) C # 's syntax is more powerful than Java, because C # supports operator overloading and type-safe enumerations, and you can also select embedded pointers and other illegal syntax in a C # program.
(2) C # can be associated with other. NET language code for seamless interoperability
(3) C # can be seen as a cheaper, less complete Java alternative
(4). NET base class provides a unified, standardized source for C # to meet the needs of common functionality.

The following comparisons to JavaScript and VBScript don't want to say anything more, because it's too far-fetched.

The application of C #

(1) Asp. NET application
(2) Web Forms
(3) Web control
(4) Web Services
(5) Class Library
(6) Windows applications
(7) Windows controls (you do not have to register.) NET component, the client can access it by simply placing a copy of the component in the directory of the client application. )
(8) Control console Application


Overview of C # features

(1) based on. NET base class
(2) Flow control statements (support for each struct and a?) B:C)
(3) Object-oriented function
(4) Reflection and attributes (this piece is very vague, not very clear)
(5) Can handle unsafe code

C # compiler

(1) C # program compilation in two ways, command-line mode and integrated IDE approach.
(2) Input and output file: csc sourcefile.cs/out:targetfile.exe (Everyone should be able to see)
(3) Compile different types of engineering (in fact, the key is the different parameters)
/t:exe set up a console application.
/t:winexe establishes a Windows Form application.
/t:library set up a separate assembly containing the list.
/t:module set up a fitting file, but no list.


This chapter is a lot of content, it is also very general feeling. But I think it should be enough for our beginners to master this. Because this is only a foreshadowing, there are more introductions, so do not want to go further. It's not better to look at it with doubt.

Let's look forward to the next chapter.



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.