I was going through some code and came across a scenario where my combobox has not been initialized yet. This is in .NET 2.0 and in the following code, this.cbRegion.Select
If you compile
object o = null;
int a = (int)o;
and look at the MSIL code, you'll see something like
ldnull
...
unbox.any int32
Now the behavior for unbox.any is specified as follows:
InvalidCastException is thrown if obj is not a boxed type.
NullReferenceException is thrown if obj is a null reference.
This is what you see in your code.