title: How to remove empty elements from Dictionary<string,string>?
body: <p>I'd like to remove all elements that have empty values from a Dictionary.  I've tried the following:</p>
  
  <pre><code>MyDict = MyDict.Where(item =&gt; !string.IsNullOrEmpty(item.Value));
  </code></pre>
  
  <p>But that throw the exception:</p>
  
  <pre><code>Unable to cast object of type 'WhereEnumerableIterator' 1
  [System.CollectionsGeneric.KeyVauePair' 2[System.String,System.String]]' to type
  'System.Collections.Generic.Dictionary' 2[System.String,System.String]'.
  </code></pre>
  
  <p>Is there some other way to do this?</p>