c# - setter value is null -
I understand that after setting a double value in the setter, the value is zero.
The code is such:
Public Class Product {Private Double? U_total; Public double? Total {received {return u_total; } Set {u_total = value; }}} When I call:
for (i = 0; i For the first case, the list [1] .pice (double?) Is 1234.5, but the value of the setter will be zero. And my productions 0.
Please advice what is wrong
I guess instead
should be (u_total! = Null)
if (u_total == zero)
Comments
Post a Comment