can a struct be derived from a class in c#?

c#, class, struct

Solution

Integers and other value types (e.g. bool) are objects, because it allows them to leverage inheritance (i.e. they have access to the common `.Equals()`, `.GetType()`, `.ToString()` functions).

It's a design decision in the .NET framework. Rather than writing separate functions for all the value types under System.ValueType, they use a common code base.

Microsof's document on Types

Problem

Can a struct be derived from a class in c#? If not, Why can primitive data types, such as int, be derived from the class `object`? Since the data type int is basically a struct type(value type). Is this just an exception to the rule?

Original source

Related problems