It was pointed out to me last night that an integer is, in fact, a value type and not an object. Well, yes and no. In C#, an
int is an integral type that gets you a
System.Int32 structure, as you can see [
here]. Further, a
System.Int32 structure derives from
System.ValueType which, in turn derives from
System.Object. As they say, “This is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.” Everything is an object. Ha! Additionally, any value type can be
implicitly converted to an object any time you like.