How structures inheriting from value types
If Structures does not supports inheritance, then how can we say that they are inheriting from value types?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Feb 21, 2014, 5:35 AM
System.ValueType overrides the virtual methods it inherits from System.Object so they are more suitable for structs.
Note that you can't explicitly inherit from System.ValueType in your own code. It follows from this that structs cannot inherit from any class other than System.ValueType.
You'll find that there's a certain amount of 'strangeness' in the way that value types (structs and enums) are dealt with in .NET because of the need to present a unified type system with reference types.