Eric Lippert has covered this in a blog entry: Not everything derives from object (This is the title of the blog entry; not the answer to this question. Don't get confused.)
Yes, all struct
s inherit from System.ValueType
which in turn inherits from System.Object
. enum
s you declare inherit from System.Enum
which inherits from System.ValueType
.
Update:
Inherently, there's not a problem with a value type being derived from a reference type. Inheritance is a "is-a" relationship between two types. However, in order to treat a value type as an object instance, it has to be boxed. This is done implicitly when you are passing a value to a method that expects an object parameter (or when you call instance methods implemented in System.Object
.)