title: MongoDb C# driver - serializing List<enum> as string[]
body: <p>I have a class with a property of type <code>List&lt;SomeEnum&gt;</code>. Something like this:</p>
  
  <pre><code>public enum MyEnum
  {
    A,
    B
  }
  
  public class MyClass
  {
      public string Id { get; set; }
      public List&lt;MyEnum&gt; Values { get; set; }
  }
  </code></pre>
  
  <p>I'm already using the <code>EnumRepresentationConvention</code> in this way:</p>
  
  <pre><code>ConventionRegistry.Register("EnumStringConvention", new ConventionPack { new EnumRepresentationConvention(BsonType.String) }, t =&gt; true);
  </code></pre>
  
  <p>Still, the <code>Values</code> property gets serialized as an array of ints (simple enum properties are correctly handled as ints). It seem the convention is not used in the context of the list serialization.</p>
  
  <p>How can I enforce the serializer to write strings instead of ints?</p>