Why bytes in c# are named byte and sbyte unlike other integral types?

It’s a matter of semantics. When you think of a byte you usually (at least I do) think of an 8-bit value from 0-255. So that’s what byte is. The less common interpretation of the binary data is a signed value (sbyte) of -128 to 127.

With integers, it’s more intuitive to think in terms of signed values, so that’s what the basic name style represents. The u prefix then allows access to the less common unsigned semantics.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)