Table of Contents

Class object

Namespace
System
Assembly
mscorlib.dll

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.

public object
object
Extension Methods

Constructors

Object()

Initializes a new instance of the Object class.

public Object()

Methods

Equals(object)

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

public virtual bool Equals(object obj)

Parameters

obj object

he object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

Equals(object, object)

Determines whether the specified object instances are considered equal.

public static bool Equals(object objA, object objB)

Parameters

objA object

The first object to compare.

objB object

The second object to compare.

Returns

bool

true if the objects are considered equal; otherwise, false. If both objA and objB are null, the method returns true.

GetHashCode()

Serves as the default hash function.

public virtual int GetHashCode()

Returns

int

A hash code for the current object.

GetType()

Gets the Type of the current instance.

public Type GetType()

Returns

Type

The exact runtime type of the current instance.

Remarks

Available only in mscorlib build with support for System.Reflection.

MemberwiseClone()

Creates a shallow copy of the current Object.

protected object MemberwiseClone()

Returns

object

A shallow copy of the current Object.

ReferenceEquals(object, object)

Determines whether the specified Object instances are the same instance.

public static bool ReferenceEquals(object objA, object objB)

Parameters

objA object

The first object to compare.

objB object

The second object to compare.

Returns

bool

true if objA is the same instance as objB or if both are null; otherwise, false.

ToString()

Returns a string that represents the current object.

public virtual string ToString()

Returns

string

A string that represents the current object.

Remarks

Available only in mscorlib build with support for System.Reflection.