System vs System.Object

  • Thread starter Thread starter Daniel
  • Start date Start date
D

Daniel

Hi,

I have got a general question regarding the base class
library. From what I have read so far, most classes in the
base class library (and indeed custom created classes)
inherit from the System.Object namespace. And System is
the primitive type. So, what are the relationship between
this two?

What other "primitive" types are there beside
System? 'Micosoft'?

Thanks in advance.
 
"System" is a namespace. System.Object is the base type (object), that
happens to reside in the System namespace.

System, Microsoft, whatever, are not types, just namespaces.

-mike
MVP
 
Hi Daniel,

Firstly I want to thank Michael's correct and concise answer for the
question.

Please refer to the following URLs for the detailed information regarding
this issue.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystem.asp
"The System namespace contains fundamental classes and base classes that
define commonly-used value and reference data types, events and event
handlers, interfaces, attributes, and processing exceptions..."

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemobjectclasstopic.asp
"The System.Object class supports all classes in the .NET Framework class
hierarchy and provides low-level services to derived classes. This is the
ultimate base class of all classes in the .NET Framework; it is the root of
the type hierarchy..."

I hope it helps.

Best regards,

Jacob Yang
Microsoft Online Partner Support
Get Secure! ¨C www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
You got it wrong - System is the namespace and System.Object is the type
most other types are derived from. And primitive types are types that are
not objects or structures, such as char, int and so on (but not string,
that's always an object, System.String).

Jerry
 
Jerry III said:
You got it wrong - System is the namespace and System.Object is the type
most other types are derived from. And primitive types are types that are
not objects or structures, such as char, int and so on (but not string,
that's always an object, System.String).

Actually, char, int, etc are implemented as structures.
 
Back
Top