In Convert.ToPrimitive(), Marshal the newly created unicode buffer pointer as a character array because the cast result = (char)Marshal.ReadInt16(op); throws an OverflowException on negative numbers.
Convert.ToPrimitive() uses Marshal.Copy() to get a unicode character
Log in to post a comment.
Convert.ToPrimitive() uses Marshal.Copy() to get a unicode character