Home  >  Article  >  Backend Development  >  Summary of basic knowledge

Summary of basic knowledge

零下一度
零下一度Original
2017-06-15 10:57:031342browse

After reading the usage of delegation in the previous article http://www.php.cn/, we see that public void Description(string programerName, DescriptionDelegate description)                                    description(programerName); }This method passes a De

1. C# Basic Knowledge Organizing Basic Knowledge (21) Delegation (2)

Summary of basic knowledge

Introduction: This method passes a DescriptionDelegate description delegate type in. Then make some modifications to this method to make it more convenient to use and the code will be more reasonable. Encapsulate the delegation, and then put forward the description methods for programmers in different languages:

2. C# Basic Knowledge Organizing Basic Knowledge (20) Delegation (1)

Summary of basic knowledge

Introduction: Delegates and events are used a lot in C#, especially when doing form programming, many operations To be handled and delivered through delegates and events. Here is a detailed explanation of the usage and reasons of delegates and events, so that we can understand it more clearly when writing code.

3. C# Basic knowledge of basic knowledge (19) Boxing and unboxing of value types (2)

Summary of basic knowledge

Introduction: If the code will cause repeated boxing by the compiler, you can change it to manual boxing. This will make the code execute faster. See the following code:

4. C# Basic knowledge of basic knowledge (18) Boxing and unboxing of value types (1)

Summary of basic knowledge

Introduction: It is actually very interesting to understand boxing and unboxing carefully. First, let’s look at why boxing and unboxing occur?

5. C# Basic knowledge of basic knowledge (17) ILiest interface - generics

Summary of basic knowledge

Introduction: Inserting a value type into ArrayList will trigger a boxing operation, and removing a value type requires unboxing, as follows

6 . C# Basic knowledge organizing basic knowledge (16) IList interface - non-generic

Summary of basic knowledge

Introduction: After understanding the ICollection interface, iteration and generic collections, let's take a closer look at the IList interface.

7. C# Basic knowledge compilation: basic knowledge (15) ICollection, iteration and generics

Summary of basic knowledge

Introduction: Array is the most basic collection type defined by .net framework. In addition to arrays, .net framework also defines many collection types. Open msdn and you can see that all collections are under the System.Collections namespace:

8. C# Basic knowledge arrangement: Basic knowledge (14) Array

Summary of basic knowledge

Introduction: No matter which language, there will definitely be the concept of sets. The simplest and most intuitive collection should be an array. An array is a continuous space in memory. Take a look at arrays in C

#9. C# Basic knowledge arrangement: Basic knowledge (13) Exception

Summary of basic knowledge

Introduction: Often when we write code, we always encounter certain problems during operation that cause the program to crash. This is not because the programmer's level is not good, but because of problems with the business logic, operating system, or other equipment such as computers. For example, some methods in user32.dll are often used in C#. If this file is deleted , your program still cannot run. Of course, as a skilled programmer, you always need to take various situations into consideration when writing a program. The higher the level, the more situations you have to consider, and the more you consider, the less chance your program will crash. The better the robustness.

10. C# Basic knowledge arrangement: Basic knowledge (12) Super class Object

Summary of basic knowledge

Introduction: The three major characteristics of object-oriented: encapsulation, inheritance, and polymorphism. So where do classes inherit from? In object-oriented languages, there is the concept of base class or super class, that is, all classes inherit from this class. This super class is called Object. The Object class is described in .net like this:

The above is the detailed content of Summary of basic knowledge. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn