mscorlib(4.0.0.0) API with additions
System.Object Class Reference

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.To browse the .NET Framework source code for this type, see the Reference Source. More...

Public Member Functions

 Object ()
 Initializes a new instance of the T:System.Object class. More...
 
virtual string ToString ()
 Returns a string that represents the current object. More...
 
virtual bool Equals (object obj)
 Determines whether the specified object is equal to the current object. More...
 
virtual int GetHashCode ()
 Serves as the default hash function. More...
 
Type GetType ()
 Gets the T:System.Type of the current instance. More...
 

Static Public Member Functions

static bool Equals (object objA, object objB)
 Determines whether the specified object instances are considered equal. More...
 
static bool ReferenceEquals (object objA, object objB)
 Determines whether the specified T:System.Object instances are the same instance. More...
 

Protected Member Functions

object MemberwiseClone ()
 Creates a shallow copy of the current T:System.Object. More...
 

Detailed Description

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.To browse the .NET Framework source code for this type, see the Reference Source.

Definition at line 18 of file Object.cs.

Constructor & Destructor Documentation

◆ Object()

System.Object.Object ( )

Initializes a new instance of the T:System.Object class.

Definition at line 24 of file Object.cs.

Member Function Documentation

◆ Equals() [1/2]

virtual bool System.Object.Equals ( object  obj)
virtual

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object; otherwise, false.

Definition at line 41 of file Object.cs.

◆ Equals() [2/2]

static bool System.Object.Equals ( object  objA,
object  objB 
)
static

Determines whether the specified object instances are considered equal.

Parameters
objAThe first object to compare.
objBThe second object to compare.
Returns
true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

Definition at line 52 of file Object.cs.

◆ GetHashCode()

virtual int System.Object.GetHashCode ( )
virtual

Serves as the default hash function.

Returns
A hash code for the current object.

Definition at line 81 of file Object.cs.

◆ GetType()

Type System.Object.GetType ( )

Gets the T:System.Type of the current instance.

Returns
The exact runtime type of the current instance.

◆ MemberwiseClone()

object System.Object.MemberwiseClone ( )
protected

Creates a shallow copy of the current T:System.Object.

Returns
A shallow copy of the current T:System.Object.

◆ ReferenceEquals()

static bool System.Object.ReferenceEquals ( object  objA,
object  objB 
)
static

Determines whether the specified T:System.Object instances are the same instance.

Parameters
objAThe first object to compare.
objBThe second object to compare.
Returns
true if objA is the same instance as objB or if both are null; otherwise, false.

Definition at line 73 of file Object.cs.

◆ ToString()

virtual string System.Object.ToString ( )
virtual

Returns a string that represents the current object.

Returns
A string that represents the current object.

Definition at line 31 of file Object.cs.


The documentation for this class was generated from the following file: