Home » ASP.NET » reading no...

reading notes - void types

reading notes - available types, there is a friend in need of reference.

C# can be empty type

sometimes requires value types as well as null types in program development. For example, in a database, we can set a date Datetime to null.

has an empty type in C# 2, and the allowed value type can be empty (null). The implementation of an empty type is based on the C# generic.

basic knowledge of null type

The core of the

null type is System.Nullable, and the static class System.Nullable provides many useful methods for the null type. Here are two important components of the null type,.


through ILSpy, we can view this type of C# Code:

from the diagram above, you can see some of the key points about System.Nullable:

Nullable is a generic type

The type parameter T has a value type constraint (based on the value type constraint: T: struct, and T cannot be an empty type, that is to say, Nullable