Asked such a question
int x = null; Naturally it is impossible, but is it possible to get around somehow?
Asked such a question
int x = null; Naturally it is impossible, but is it possible to get around somehow?
int? x = null; Will not work? Here's the article: Types that allow NULL values (C # Programming Guide) .
I think, nizya because primitives are not objects, therefore they must be declared necessarily. If you really want - there are wraps over them.
As I remember, the NULL type of the variable int cannot take, usually assign a value equal to 0.
Nullable<T> and its wrapper T? - SpecterSource: https://ru.stackoverflow.com/questions/99835/
All Articles