According to the C# built-in types table at http://msdn.microsoft.com/en-us/library/ya5y69ds.aspx,
the ushort is a 16-bit unsigned integer. The byte is an 8-bit unsigned integer.
So when I declare:
public byte x;
Neither of those, I can not do the following:
x = x+1;
i get an error: "Cannot implicitly convert type "int" to "ushort" or to "byte".
Why is this? They are both integer-grade data types? I don't want to use the "int" type because that is a 32-bit signed integer, requiring more memory than I need.
View Complete Post