Shorthand ReferenceEquals

public static new bool ReferenceEquals(this object objA, object objB) { return Object.ReferenceEquals(objA, objB); }
Example:
string a = "123";
string b = a;
bool result = a.ReferenceEquals(b);
// result will true

Description

This extension method represents shorthand version of ReferenceEquals method.

Details

  • Author: rkttu
  • Submitted on: 2/3/2016 6:02:52 PM
  • Language: C#
  • Type: Object
  • Views: 722

Double click on the code to select all.

 

;