I need to sometimes set the value of an int to null and sometimes to an actual value. The problem is I need to store that value in the SAME variable not create another.
int? year;
if(something)
year = null;
else
int.tryParse("some string", out year);
"some string" is always a valid int but the problem is I can't use int.tryParse on int? How to get around that?