This project has moved. For the latest updates, please go here.

Bug: TypeNameHandling.All doesn't work for object[]

Jul 2, 2010 at 7:41 PM

I have a field definition like this:

        object[] MyValues;

When I serialize the object using BsonWriter, a type name is written for the array itself, but not for the objects in the array.

I also tried TypeNameHandling.Arrays and TypeNameHandling.Objects, but that didn't fix the problem either.   It's a bug, right?

Jul 3, 2010 at 8:41 AM

That property doesn't apply to values of the collection, just the collection itself. See here for more info:

Jul 3, 2010 at 9:54 AM

TypeNameHandling.Auto added.