Search code examples
mongodbmongodb-.net-driver

MongoDB c# sharp Property vs Field vs Member vs Element


Looking into Custom Serialization, what's the difference between

A "Property" BsonClassMap.MapProperty
A "Field" BsonClassMap.MapField
A "Member" BsonClassMap.MapMember

Solution

  • This answer should cover it:

    What is the difference between a Field and a Property in C#?

    C# fields are meant to be hidden. Properties expose fields.