title: Check if all items in a Collection have the same value
body: <p>An extension method on a collection named MeasurementCollection checks if the property Template.Frequency (Enum) of each item has the same value.</p>
  
  <pre><code>public static bool IsQuantized(this MeasurementCollection items)
  {
      return  (from i in items 
               select i.Template.Frequency)
              .Distinct()
              .Count() == 1;
  }
  </code></pre>
  
  <p><strong>edit</strong>
  info about underlying classes</p>
  
  <pre><code>MeasurementCollection : ICollection&lt;IMeasurement&gt;
  
  IMeasurement 
  {
      IMeasurementTemplate Template { get; }        
      ......
  }
  </code></pre>
  
  <p>Is this a correct approach or is there an easier solution already in Linq?
  This method will be used intense in the application.</p>
  
  <p>Have you got tips to take with me, back to the drawing board?</p>