title: Lambda expressions numbers divisible by 9 and 3 c#
body: <p>I want to write a program that prints from a given array of integers those numbers that are divisible by 3 and 9.I want to use the built-in extension methos and lambda expression.
  What I've done:</p>
  
  <pre><code> static void Main(string[] args)
      {
          List&lt;int&gt; l = new List&lt;int&gt;() {18,3,27,42};
          List&lt;int&gt; divBy3 = l.FindAll(x =&gt; (x % 9) == 0);
          List&lt;int&gt; divBy9 = l.FindAll(x =&gt; (x % 3) == 0);
          if (divBy9 == divBy3)
          {
                 foreach (var num in divBy9)
              {
                  Console.WriteLine("The numbers divisible by 9 and 3 are: {0}",num);
              }
          }
          else
          {
              Console.WriteLine("There are no numbers divisible by 9 and 3.");
          }
      }
  </code></pre>
  
  <p>And the output should be {27,18}.
  My output is always the else branch but I don't understand why.I've tried to put in the original array of integers only the values {18,27} and it should verify the equality.In foreach I put to check only in the divBy9 list because I thought that if the 2 lists are equal would be the same thing to check only in one list, but I don't think is good.
  What's wrong? Thank you.</p>