Are the .Net primitive data types classes or structures?? Also, is a structure considered an object? Can you derive another structure from another structures? Sorry for so many questions, but my book is unclear about this topic.
Printable View
Are the .Net primitive data types classes or structures?? Also, is a structure considered an object? Can you derive another structure from another structures? Sorry for so many questions, but my book is unclear about this topic.
I don't have an answer but I found this on MSDN.
http://msdn.microsoft.com/library/de...ceapicalls.asp
the data types are class objects...everything in .NET is treated as such.
i believe yes you should be able to derive a struct from a struct.
The type hierarchy for .net starts off with "object" at the top, under which is
Code:Object
String (note, not a primitive type)
Array
ValueType
PrimitiveTypes
Enum
Structure
Exception
Delegate
Multicast Delegate
Class
Primitive datatypes are value types (like structs) not reference types (like classes).
And a struct can't be derived from another struct !