1、运算符和可空类型 对于可空类型,简单类型的运算符和类型转换,均使用。 int? op1= 5 int? result=op1*2;正确 int? op1 =5 int resu|t=op1*2;错误 int? op1=5 int result=(int)op1*2;正确 int? op1=5 int result=op1. Value*2;正确1、运算符和可空类型 对于可空类型,简单类型的运算符和类型转换,均使用。 int? op1 = 5; int? result = op1 * 2; 正确 int? op1 = 5; int result = op1 * 2; 错误 int? op1 = 5; int result = (int)op1 * 2; 正确 int? op1 = 5; int result = op1.Value * 2; 正确