contactmatt
contactmatt

Reputation: 18600

.NET C# : Does System.Int64 have a base type of System.ValueType?

When looking at mscorlib.dll via Object Browser in Visual Studio 2008, the IDE indicates that Int64 (as well as the other data types) has a base type of ValueType.

In C#, I am aware that structs (which Int64 is) do not support object inheritance. I even checked the type metadata of an assembly in which I declared a System.Int64 property of a class, and there was no indication of Int64 extending any classes. Structs can extend interfaces, and I am aware of this.

I am confused on why the struct Int64 is showing a BaseType of ValueType.

Could someone please explain?

dalt text

Upvotes: 1

Views: 467

Answers (1)

SLaks
SLaks

Reputation: 887365

All value types implicitly inherit System.ValueType.

Upvotes: 3

Related Questions