title: Dictionary to Custom KeyValuePair list - can't convert (C# .Net 4.0)
body: <p>I read that dictionary and KeyValuePair can not be written by the xml serializer.
  So I wrote my own KeyValuePair struct.</p>
  
  <pre><code>public struct CustomKeyValuePair&lt;Tkey, tValue&gt;
  {
     public Tkey Key { get; set; }
     public tValue Value { get; set; }
  
     public CustomKeyValuePair(Tkey key,tValue value) : this()
     {
        this.Key = key;
        this.Value = value; 
     }
  }  
  </code></pre>
  
  <p>But when I do this, I get an error, that it can't convert:</p>
  
  <pre><code>List&lt;CustomKeyValuePair&lt;string, AnimationPath&gt;&gt; convList = 
                     Templates.ToList&lt;CustomKeyValuePair&lt;string, AnimationPath&gt;&gt;();
  </code></pre>
  
  <p>It works on the normal keyValuePair, but not on my custom one. So whats the problem?
  I tried to copy the original as close as possible, but it doesn't want to convert my dictionary (Templates) to that list. I can't see that it uses any interface or inherits from a struct to do that. Do I have to add all the entries manually?</p>