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
精彩评论