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

Can't cast Int32 to Int16

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.4.1
    • Component/s: Serialization
    • None
    • Environment:
      .NET core, Windows 10
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

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

              Created:
              Updated:
              Resolved: