How come System.Object is base class for int and string ?
Asked
Active
Viewed 48 times
-2
-
2String isn't a value type, by the way. – Jon Skeet Mar 13 '13 at 14:51
-
1I thought humanity was above reposting existing questions (with the same exact title no less), but it never ceases to prove me wrong. – Jon Mar 13 '13 at 14:55
1 Answers
0
as MSDN says:
Value types derive from System.ValueType, which derives from System.Object. Types that derive from System.ValueType have special behavior in the CLR. Value type variables directly contain their values, which means that the memory is allocated inline in whatever context the variable is declared. There is no separate heap allocation or garbage collection overhead for value-type variables.

Sergio
- 6,900
- 5
- 31
- 55