+ 2
How is an unsigned integer specified in C#? How do you specify the bits of precision?
The C# SoloLearn course introduces the variable types but never mentions whether an integer is signed or unsigned or how precise it is. Later we learn that there's a class to convert to integers with a certain precision, like Int32. How can I specify the precision when declaring a variable and how can I make it unsigned?
1 Odpowiedź
+ 6
if var unsighned use like ushort ubyte etc
and you can test them in your code
Console.WriteLine(short.MaxValue);
Console.Readline();