title: Are lambda value objects?
body: <p>As I understand 2 lambdas should be equal as long as they declare the same code in the same order with the same parameters.</p>
  
  <p>But a simple test on GetHashcode fails:</p>
  
  <p><code>$</code></p>
  
  <pre><code>    private class LambdaTest 
      {
          private bool x;
  
          public Expression&lt;Func&lt;object, bool&gt;&gt; Predicate
          {
              get { return o =&gt; x; }
          }
  
          public LambdaTest(bool x)
          {
              this.x= x;
          }
  
          public override int GetHashCode()
          {
              return Predicate.GetHashCode();
          }
  
      }
  </code></pre>
  
  <p><code>$</code></p>
  
  <p>Test
  <code>$</code></p>
  
  <pre><code>    [Test]
      public void hashonlambdas()
      {
          NullSpecification n1 = new NullSpecification(true);
          NullSpecification n2 = new NullSpecification(true);
  
          Assert.AreEqual(n1.GetHashCode(), n2.GetHashCode());
      }
  </code></pre>
  
  <p><code>$</code></p>
  
  <p>Can you tell me if Im doing something wrong or maybe lambdas are not value objects</p>