C # basic Knowledge Collation:. NET knowledge

Source: Internet
Author: User
Tags silverlight
1. What is the. NET Framework
The so-called. NET Framework is a platform that is designed to be programmed across operating systems. It contains many modules, such as Windows application artifacts, Web development modules, and different operating systems that support some of these modules according to their own characteristics. The NET framework is a programming platform that runs on virtual machines and is based on the common language runtime (Common Language Runtime) and supports the development of multiple languages (C #, vb.net, C + +, and so on). You can develop desktop applications (WinForm, WPF, Silverlight, Office), Web Applications (ASP. NET, ASP, Silverlight), Windows Service, and mobile embedded development. The currently used versions are: 2.0, 3.0, 3.5, 4.0;
2,. A few concepts in net
(1), CLR concepts?
Details: The CLR is the common language runtime, and the Java Virtual machine (Common Language runtime) is also a run-time environment that is responsible for resource management (memory allocation and garbage collection) and ensures the necessary separation between the application and the underlying operating system.
(2), the advantages of managed code?
Details: http://www.php.cn/
(3), the real meaning and manifestation of language interoperability?
Detail: Classes written in one language should inherit classes written in another language
A class can contain instances of another class, regardless of the language in which they are written. An object should be able to call directly with its
The method of writing objects in his language
Objects (or object references) should be able to be passed between methods
When you call a method between different languages, you should be able to debug the calls to these methods in the debugger, that is, to debug different languages.
The Code
(4), in. NET, the program compilation process?
Details: http://www.php.cn/
(5) What are the main features of the intermediate language?
Can be compiled in real time by different compilers and run on different structures, eliminating the language dispute. Intermediate language or high-level language.
(6), dynamic language and static language, strong type definition language and weak type definition language concept distinguish?
Dynamic type language: The language in which data type checking is done during run time,
Static type language: The data type is checked during compilation.
Strongly typed definition language: A language that enforces the definition of a data type.
Weak type definition language: A language in which data types can be ignored. In contrast to strongly typed definition languages, a variable can assign values of different data types.
(7) compiled and interpreted (refer to from the blog Park)
First look at the compiler, in fact, it is the same as the assembly language: There is a translation program to convert our source code to generate the corresponding executable code. This process is a bit more professional, called compilation (Compile), and the compiler responsible for compiling is naturally called the compiler (Compiler). If we write the program code is contained in a source file, then usually compiled after the direct generation of an executable file, we can run directly. But for a more complex project, for ease of management, we usually distribute the code in various source files as different modules to organize. When you compile individual files, you generate the target files (object file) instead of the executable file that you said earlier. Typically, a source file is compiled with a target file. The contents of these target files are basically executable code, but because they are only part of the entire project, we cannot run them directly. After all the source files have been compiled, we can finally "package" these semi-finished target files into an executable file, which is the responsibility of another program, because this process seems to be to assemble the target file containing executable code, so called link, And the program that is responsible for linking is called ... called the link Program (Linker). In addition to linking the target file, the linker may also have various resources, such as icon files, sound files, etc., and be responsible for removing redundant duplicated code between the target files. Once the link is complete, you will generally get the executable file we want.
Then look at the explanatory type. "Compilation" and "Interpretation" do have the meaning of "translation", the difference is that the timing of translation is not very similar. For example: If you are going to read a foreign language book, and you do not know it, then you can find a translator, give him enough time to translate the whole book from beginning to end, and then give you the native language version of the book to read, or you can immediately let the interpreter assist you to read, let him sentence to you to translate, If you want to look back at a chapter, he will have to re-translate it for you.
Two ways, the former is equivalent to what we just said the compiler: once all the code into the machine language, and then written into the executable, and the latter is equivalent to the interpretation of the type: in the first moment of the program run, there is only the source program and no executable program, and every execution of the program to the source program, a command, There will be a shell called an interpreter that transforms the source code into binary code for execution, and in general, explains, executes, interprets, executes ... Therefore, the interpretation procedure is inseparable from the interpretation procedure. Like the early basic is a classic interpretation of the language, in order to execute the basic program, you have to enter the basic environment before you can load the program source files, run. In an explanatory program, because the program is always in the form of source code, the porting is almost no problem as long as there is a corresponding interpreter. Compiled program Although the source code can also be ported, but the premise is that different systems must be compiled separately, for complex projects, it is really a very small time consumption, and it is likely that some of the details of the place or to modify the source code. Moreover, the interpretation of the program saves the steps of compiling, debugging is also very convenient, editing can be run immediately, do not have to be like a compiled program every small change must be patient waiting for a long compiling ... Linking ... This process of compiling links. However, there are pros and cons, because the interpretation procedure is to put the process of compilation into the implementation process, which determines that the interpretation of the program is destined to be slower than the compilation of a large section, like hundreds of times times the speed gap is not surprising.
Compiled and interpreted type, both have pros and cons. The former because the program execution speed, the same conditions on the system requirements are low, so like the development of operating systems, large-scale applications, database systems, such as the use of it, such as C + +, Pascal/object Pascal (Delphi), VB and other basic can be regarded as compiled language, and some web script , server scripts, and auxiliary development interfaces for applications where speed requirements are low and the compatibility of different system platforms are required, it is common to use explanatory languages such as Java, JavaScript, VBScript, Perl, Python, and so on.
However, since the compilation and interpretation of the pros and cons of each other, so a number of emerging languages have a tradeoff between the two trends, such as the Java language is relatively close to the interpretation of the characteristics of the language, but before execution has been pre-compiled, generated code is between the machine code and Java source code between the intermediary code , the runtime is interpreted by the JVM (the Java Virtual Machine platform, which can be interpreted as an interpreter). It retains the high abstraction and portability of the source code and has completed much of the precompiled work on the source code, so it is much faster to execute than the "pure interpreter" program. In languages like VB6 (or previous versions) and C #, although it is apparent that an. exe executable file is generated, the VB6 is actually generated as a mediation code, except that the compiler has placed a code that automatically invokes an external interpreter, which is independent of the user-written program. In a DLL file that is stored in the system, all executable programs generated with VB6 compilation are used to interpret the actual program body. C # (and other. NET language compilers) generate. NET target code, which is executed by the. NET interpretation system (just like the JVM, which is also a virtual machine platform). Of course, the. NET target code is quite "low-level", closer to the machine language, so it is still considered a compilation language, and its portability is not as strong as Java claims, Java claims to be "compile, execute everywhere", while. NET is "once encoded, compiled everywhere." In short, with the development of design technology and hardware, the boundary between the two ways of compiling and interpreting is constantly becoming blurred.

The above is the basic knowledge of C # collation:. NET knowledge content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

  • 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.