title: how to check if a c# list contains only the given value ??
body: <p>I want to check a list for a given value and the list should contain only the given value. Say for example</p>
  
  <pre><code>List&lt;string&gt; alltypes = new List&lt;string&gt;();
  </code></pre>
  
  <p>i want to check 'alltypes' for something like a value 'sedan' and if that is the only element in the list alltypes then return true</p>
  
  <p>Appreciate any help..thank u </p>