私有(private)整数? _City_Id;
最佳答案
在不知道您要回复的目标语言的情况下,在 C# 2.0 中?
表示可为 null 的值类型。
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.
正如 Calum 指出的那样(所有功劳都归功于他),这意味着可以为变量分配 null
。通常像 int
和 double
这样的基元不能为空,
int? x = 10;
double? d = 4.108
关于c# - 私有(private)诠释? _城市_Id;谁能告诉我 "?"在这里是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2691088/