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

Consider throwing ArgumentOutOfRangeException when DateTime overload of ObjectId is out of range.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.0
    • Affects Version/s: None
    • Component/s: BSON
    • Labels:
      None
    • Minor Change

      ObjectId's contain a timestamp component that is a 32-bit integer. We have an overload allowing the user to specify a DateTime as the timestamp field. .NET's DateTime class allows for values beyond the range of a 32-bit integer. We should consider throwing an ArgumentOutOfRangeException when one of these is used.

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            craig.wilson@mongodb.com Craig Wilson
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: