title: IEqualityComparer and singleton
body: <p>I was wondering if there is possibility to use singleton as comparerObject in for example Distinct ??</p>
  
  <p>Let's say that I have a list of element and I need to use distinct function on that list. Normally I would do that this way </p>
  
  <pre><code>var result  = list.Distinct(new ListElementComparer);
  </code></pre>
  
  <p>ListElementComparer is a class which implements IEqualityComparer interface.
  However let's assume that I will be using code mentioned above quite frequently for example that way .</p>
  
  <pre><code>List&lt;List&lt;Element&gt;&gt; elementList = new List&lt;List&lt;Elements&gt;&gt;();
  List&lt;List&lt;Element&gt;&gt; resultList  new List&lt;List&lt;Element&gt;&gt;();
  
  foreach(var element in elementList )
     resultList.AddRange(element.Distinct(new ListElementComparer() )  );
  </code></pre>
  
  <p>So as You can object of ListElementComparer might be created quite a lot of times. In this case is there any point of using singletone insted of createing ListElementComparer in each iteration ? Will the distinct method work if I use singleton ??</p>