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

Allow [BsonDefaultValue] on member fields as well as properties

    XMLWordPrintable

    Details

      Description

      [BsonDefaultValue] is only valid on properties.

      However, since fields can be serialized using [BsonElement], it would make sense to allow [BsonDefaultValue] on fields as well, and use the specified default value in deserialization when none is available.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: