ExtensionMethod.NET Home of 876 C#, Visual Basic, F# and Javascript extension methods

Shorthand ReferenceEquals

This extension method represents shorthand version of ReferenceEquals method.


public static new bool ReferenceEquals(this object objA, object objB) { return Object.ReferenceEquals(objA, objB); }


string a = "123";
string b = a;
bool result = a.ReferenceEquals(b);
// result will true

Author: rkttu

Submitted on: 3 feb 2016

Language: C#

Type: Object

Views: 3499