如果您要将项目或属性转型为可为 Null 的型别 (Nullable Type),撷取可能存在或可能不存在之项目 (或属性) 的值时,较容易撰写程式码。 本主题中的最后一个范例会示范这个情况。
基于10个网页-相关网页
以上来源于: WordNet
In C# you can flag a value type as a nullable type by adding ? after the type (like int? x;).
在C#中,你可以在一个允许为空的值类型后面加上一个问号(比如,int? x;)。
If a column in the database is marked as being nullable, then the corresponding property in the data model class created by the LINQ to SQL designer will be a nullable type.
如果数据库中的一列被标志为可空,那么数据模型类相应的属性将是一个可空的类型。
Specifically, any type defined as Nullable (Of t) wasn't allowed to be optional.
特别地,定义为Nullable (Of T)的任何类型都不允许是可选的。
应用推荐