J
John Wood
I was just looking at an article about using nullable value types. (value
types that can effectively have no value and not be set).
The syntax is to append a question-mark to the value type in the
declaration, eg:
int? age;
I don't like that much, I think it would be much more consistent to use a
new keyword, such as "nullable". But anyways...
A couple of questions for anyone who actually has the beta installed:
1. What's the overhead of declaring your value types nullable?
2. Are they type-compatible with non-nullable value types? (ie. can I assign
one to the other?).
Thanks,
John
types that can effectively have no value and not be set).
The syntax is to append a question-mark to the value type in the
declaration, eg:
int? age;
I don't like that much, I think it would be much more consistent to use a
new keyword, such as "nullable". But anyways...
A couple of questions for anyone who actually has the beta installed:
1. What's the overhead of declaring your value types nullable?
2. Are they type-compatible with non-nullable value types? (ie. can I assign
one to the other?).
Thanks,
John