Returns true if two objects are the same.

Namespace:  Gallio.Framework
Assembly:  Gallio (in Gallio.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public bool Same<T>(
	T left,
	T right
)
where T : class
Visual Basic (Declaration)
Public Function Same(Of T As Class) ( _
	left As T, _
	right As T _
) As Boolean

Parameters

left
Type: T
The left object, may be null.
right
Type: T
The right object, may be null.

Type Parameters

T
The object type, which must be a reference type (class) since a value type (struct) has no concept of referential identity.

Return Value

True if both objects are the same.

Implements

IComparisonSemantics..::.Same<(Of <(T>)>)(T, T)

Remarks

Rules applied:

  • Objects are the same if they are referentially equal according to ReferenceEquals(Object, Object).

See Also