I want to create a property that could able to distingush between value and no value.
i.e. for example property should be able to distingush between 0 and No value.
any pointers will be helpful.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Abhishek JainPosted Sep 17, 2013, 1:29 AM
int? test;
Now you can test it for Nullable values by checking\
test.HasValue
Its a boolean property which returns true and false so if the variable does not contain any value it will be false else true.
And to retrieve the value you can do this:
test.Value
Regards
AJ