C# - Any Code optimization technique for Overriding "Equals"?
<p>Normally ( Based on my understanding ) i have to follow a lot of steps to</p>

<p>override the "Equals" to check the state of the object. </p>

<p>Example :</p>

<pre><code>    public override bool Equals(object obj)
     {
       if (obj is SalesPerson &amp;&amp; obj != null)
       {

         SalesPerson temp;

         temp = (SalesPerson)obj;

           if (temp.fName == this.fName &amp;&amp; temp.lName == this.fName 
              &amp;&amp; temp.personAge == this.personAge )
              {

                 return true;
              }

          else
          {
            return false;
          }

      }
       return false;
     }
</code></pre>

<p><hr/></p>

<p>Any other alternative like LINQ or other techniques gives me shortcut code ? </p>

<p><strong>Update :</strong></p>

<p>Moreover i gusess i have to override GetHasCode() too when i override "Equals".</p>
