. NET basics Part 3:. NET Basics

Source: Internet
Author: User

Preface:Go back and read an article written by myself. net interview questions, I still feel dizzy ,. net has a lot of basic knowledge, so I think it is necessary to give a guide to beginners. In fact, it can be said that it is an opportunity for me to review my knowledge. net experts, you can just float it. If I say something wrong, please criticize and correct it! I have written two concepts before. in net development, I try to use an instance to describe each problem. If there is something I want to talk about:

. Net Framework . Net namespace Comparison between ASP and ASP.net Differences between ado and ado.net Assembly and application domain Compile the. net Program Stack and stack . Net garbage collection mechanism Understand terminable objects and disposed objects Exception Handling
  . Net Framework:We often repeatedly mention the. net concept. So what is it ?. Net is the core technology built and strongly recommended by Microsoft. It is the information, files, and programs that users can access anywhere, anytime, and on devices, one of his core contents is to build a third-generation Internet platform, which will break the network barriers between different Internet devices, operating systems, websites, and major institutions, solve the Problem of collaboration between websites to maximize resource sharing .. net Framework (. net frameword) the main three components:
Common language runtime Library (CLR) Base class library) Asp.net, vb.net, c # And Other Language Runtime Libraries
Public Language Runtime LibraryYes. to some extent, the operating environment of the net Framework is the same as that of the Java Virtual Machine. It is responsible for running and maintaining any program code written by the user, including memory management and thread execution, examples of code execution, code verification, compilation, and other system services. take one. the execution process is described on the webpage in ASPX format.
First, when. when a webpage In ASPX format is accessed for the first Time, it is compiled into an Intermediate Language (Microsoft Intermediate Language, MSIL), and then uses the instant Compiler (Just In Time, JIT) the corresponding machine code is claimed for execution. When the web page is accessed again, only the MSIL language is required to generate the machine code. However, if the source code is changed, you need to recompile the code into the MSIL language and then generate the machine code.
Basic LibraryYes. net Framework for all. net programmer provides a basic class library of workers. This Class Library provides hundreds of object-oriented classes to provide various complex functions such as mathematical computing, character operations, and database operations, these users can quickly build various applications. Common classes in class libraries are as follows:
System: Provides all underlying System services, including input and output, drive, and text processing Data: provides Data processing operations XML: Provides XML file output operations Web: provides tasks to complete user interfaces and Web Services. This class is ASP. NET's most common kind of WindowForms: provides the service Drawing of traditional desktop applications: the graphic creation function is provided ...................................
Because many classes are managed, this is a complicated operation. All. net references the namespace concept. For details about the so-called namespace, see.   . Net namespace: NamespaceIt is a logical unit consisting of similar classes that love you and many other functions. namespace can be used to reflect the logical relationship of the program and avoid class name conflicts, a namespace is a logical organization of different types or other types of names, rather than a physical organization. For example:
Html # viewSource "commandName =" viewSource "highlighterId =" highlighter_808287 "> view sourceprint?
System.Windows.Forms.MessageBox.Show("Hello !! ");
A "OK" dialog box appears during your running and stops the running of the program. windows. forms is the namespace. It calls the Show static method of the MessageBox class. When the namespace and the class name are used together with the class name, the class name is called the Full Decoration class name, and all types of. net base classes are called in the same way. When the Code uses the same namespace in multiple places, another method to reference the namespace is to use the using keyword at the top of the code of the program to introduce the namespace. This way, you can introduce the namespace at one time, greatly reduce repetitive work
For example, define a User Information Class: username. cs
//Customize a loginMain namespace
NamespaceLoginMain
{
Public ClassUsername
{
/// <Summary>
///Create a string field name
/// </Summary>
Public StringName= "Bacteroid";
}
}
Define an information output class: ShowMsg. cs:
//Customize a loginMain namespace
NamespaceLoginMain
{
Public ClassShowMsg
{
/// <Summary>
///Constructor output information
/// </Summary>
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.