Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>==</code> is a reference equality operator in this case. It compares if two references are identical.</p> <p>The <code>new</code> operator always create a <em>new</em> object, so a <code>new Something()</code> will <em>NEVER</em> be an identical reference to another <code>new Something()</code>.</p> <p>You can override the <code>==</code> operator to perform value comparison instead of reference comparison. This is what e.g. <code>String</code> does.</p> <h3>See also</h3> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/ms173147.aspx" rel="nofollow noreferrer">MSDN - C# Programming Guide - Guidelines for Overriding Equals() and Operator ==</a></li> </ul> <h3>Related questions</h3> <ul> <li><a href="https://stackoverflow.com/questions/971954/difference-between-equals-and"> Difference Between Equals and == </a></li> <li><a href="https://stackoverflow.com/questions/772953/what-is-the-difference-between-equals-and"> What is the difference between .Equals and == </a></li> <li><a href="https://stackoverflow.com/questions/144530/or-equals"> == or .equals() </a></li> <li><a href="https://stackoverflow.com/questions/2494156/when-can-a-b-be-false-and-a-equalsb-true"> When can a == b be false and a.Equals(b) true? </a></li> <li><a href="https://stackoverflow.com/questions/2509965/writing-a-good-c-equals-method"> Writing A Good C# Equals Method </a></li> <li><a href="https://stackoverflow.com/questions/1766492/c-overloading-operator-versus-equals"> C# overloading operator== versus Equals() </a></li> <li><a href="https://stackoverflow.com/questions/1659097/c-string-equals-vs">C#: String.Equals vs. ==</a></li> <li><a href="https://stackoverflow.com/questions/1968787/using-or-equals-for-string-comparison">Using == or Equals for string comparison</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload