System.Nullable <T> What is the value of null * int value?
This is null .
C # 3.0 Language Specification (Section ยง7.2.7: Raised Operators)
For binary operators
+-*/%&|^<<>>:there is a removed form of the operator if the operand and result types are all value types that do not allow null values. Is a raised form built by adding a single modifier
?to each operand and type of result. The raised statement creates anullvalue if one or both operands isnull(the exceptions are the&and|operators of typebool?, as described in ยง7.10 0,3). Otherwise, the captured statement expands the operands, applies the main statement, and completes the result.
How can I prevent the compiler from marking it as an invalid operation? Should I follow custom exception handling?
This is not an invalid operation. It will not throw an exception, so you do not need to handle exceptions in this case.
Its value will be "zero", in this context, at least, we can assume that it coincides with the zero value of the database, that is, instead of "Nothing" or "Zero", it means "Unknown". Five episodes of the Unknown are still unknown, it will also never be an "empty string", since you are dealing with numbers, not strings.
I'm not sure what you mean by "How can I prevent the compiler from marking it as an invalid operation?" since this code compiles and works fine for me in Visual Studio 2008 =)