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

Can't cast Int32 to Int16

    XMLWordPrintableJSON

Details

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • 2.4.1
    • Serialization
    • None
    • .NET core, Windows 10

    Description

      If I have property of my class with type ushort. I get exception: Unable to cast object of type 'System.Int32' to type 'System.UInt16'.

      I would like to solve the problem with a type cast. Please use TryParse if necessary.

      Attachments

        Activity

          People

            robert@mongodb.com Robert Stam
            boniface Vorobjev Valery
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: