I am experiencing this rather weird decimal addition to my char value during the conversion.

Tried the following conversion but the decimal value just keeps on getting assigned along with the char to the variable:
Convert.ToChar(Console.ReadLine());Console.ReadLine().ToString()[0];Console.ReadKey().KeyChar;Object containing char field:

Schema:

Error @ DAL : System.Data.SqlClient.SqlException: 'String or binary data would be truncated.
USING : .NET Standard Libs
Your char is just displayed with the decimal value before it. So the decimal value is the ASCII value of the character. You could easily test this by printing the value and you'd see that it only contains the character. If you want to test it while debugging, I'd suggest using employeeGrade.ToString() in the watch windows.
It wouldn't even be possible for a char to hold the value 90'Z' because it would be multiple characters. You can see the ASCII values in a ASCII table like this: http://ascii.cl/.
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