开发者

private int? _City_Id; can any one tell me what "?" means here

pr开发者_如何学Pythonivate int? _City_Id;


Without knowing your target language to respond with, in C# 2.0 the ? denotes nullable value types.

Nullable value types (denoted by a question mark, e.g. int? i = null;) which add null to the set of allowed values for any value type.

Which, as Calum points out (all credit to him), means that the variable can be assigned null. Normally primitives like int and double can't be null,

int? x = 10;
double? d = 4.108
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜