ID = reader.GetInt16(2) //ID: ushort
Will give me the error Error
"Cannot implicitly convert type 'short' to 'ushort'. An explicit conversion exists (are you missing a cast?)".
What is the best practice to get the data without changing my property to short?
Like the error says, you can cast to ushort:
ID = (ushort) reader.GetInt16(2);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With