Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-2541

when using inherentence of classes and hiding class members a serialization exception occurs with duplicate property name

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.7.3
    • Component/s: BSON
    • Labels:
      None
    • Environment:
      c#, windows, server running mongo atlas

      if you have nested classes that need to be overriden you normally will use the keyword new to hide base properties. But if you do that the serializer complains about duplicate property names. The message it gives is correct but in the supplied case this is not a problem but the intention todo so. Sample and details are in stackoverflow

      https://stackoverflow.com/questions/55069966/bson-does-not-serialize-with-new-overridden-attributes-and-reports-duplicate-u

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            martien.poels_cashflows.com Martien Poels
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: