最佳答案
解释为什么一个可以为空的 int 不能被赋值为 null
int? accom = (accomStr == "noval" ? null : Convert.ToInt32(accomStr));
密码有什么问题吗?