After learning the Three-Section WebCast, I wrote down all the important titles, mainly to understand its role. I will study it again when I want to use it.

Source: Internet
Author: User

This article is from webcast.

C # Generic:
Problems that can be solved by generics: type security classes can be defined through generics without compromising type security (supported by compilers). Performance (the value type performance is improved by about 200%, reference Type performance is improved by about 100%), or work efficiency;
Implementation of generics: local support is available in IL and CLR itself;
Default Keyword: If you want to return the Default value of the type stored in the stack without exception when the stack is empty, use Default (T );
Generic alias: using name = Class <string, int>;
Generic constraints: when defining generic classes, you can restrict the type types that client code can use for type parameters when instantiating classes. If the client code attempts to instantiate a class using a type not allowed by a certain constraint, a compile-time error will occur. These restrictions are called constraints. The constraint is specified using the where context keyword. Typical error example: if (T1 = T2) // will not complile; because the compiler does not know whether the = Operator is supported for T1 and T2 (the actual type during instantiation. for example, when T1 and T2 are structured;
Derivative constraint;
New () constraints:
Struct constraints;
Class constraints;
You cannot use the reference/value type constraints with the base class constraints because the base class constraints involve classes;
The structure and default constructor constraints cannot be used, because the default constructor constraints also involve classes;
Although you can use the class and default constructor constraints, doing so has no value;
You can combine the on-demand and interface constraints of the reference/value type constraints so that the reference/value type constraints appear in the Constraints List;
Wildcard and forced type conversion; is,;
Inheritance and generics;
Generic method;
Generic delegation;
Generics and reflection;

Partial Classes)
Nullable Types)
Anonymous method (anonymous Methods)
Property Accessor Accessibility)
Coordination and inverter in Delegation
Namespace alias qualifier;
VS2005 code segment function;
Extraction method;
Closed field;
Extraction interface;
Promote local variables to parameters;
Delete parameters;
Rearrange parameters;
Class Designer
C # debugging: Edit and continue;


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