If a struct cannot inherit some class or struct,
This isn't true. All structs (and the built-in value types, like System.Int32
, System.Single
, etc) always implicitly inherit from System.ValueType (which, in turn, inherits from System.Object
).
However, you can't make a struct that inherits from anything else.
This is clearly spelled out in the C# language spec, 4.1.1:
4.1.1 The System.ValueType type
All value types implicitly inherit from the class System.ValueType, which, in turn, inherits from class object. It is not possible for any type to derive from a value type, and value types are thus implicitly sealed (§10.1.1.2).
Then, later (4.1.3) struct is explicitly defined to be a value type:
4.1.3 Struct types
A struct type is a value type that can declare constants, fields, methods, properties, indexers, operators, instance constructors, static constructors, and nested types.