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

The BsonDocument doesn't equal to itself when has double.NaN value in it.

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.8.0
    • BSON
    • None
    • C# MongoDB Driver 2.8.0
      .Net Framework 4.6.1

    Description

      This piece of code print False:

      var bd = new BsonDouble(double.NaN);
      var be = new BsonElement("test", bd);
      var document = new BsonDocument(be);

      Console.WriteLine(document.Equals(document));

       

      //This cause the BsonDocument can't be removed from a list.

      var list = new List<BsonDocument>();

      list.Add(document);
      list.Remove(document);  //Nothing happened here.

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            tom3000 Tom
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: