I always see the 1U code in C# especially in styles in OPEN XML SDK 2.0. Does anybody know the meaning of it?
Asked
Active
Viewed 2,814 times
0
-
possible duplicate of [Letter after a number, what is it called?](http://stackoverflow.com/questions/6681112/letter-after-a-number-what-is-it-called) – Greg Hewgill Jan 24 '12 at 06:13
3 Answers
1
The U
means the number is an unsigned constant.

Greg Hewgill
- 951,095
- 183
- 1,149
- 1,285
-
-
I'm certain the C# language documentation explains this in the section on numeric literals. – Greg Hewgill Jan 24 '12 at 06:16
1
It's an unsigned literal
.
For example, if you do:
var u = 1U;
Console.Write(u.GetType());
It'll tell you that it's a System.UInt32
.
See the C# spec for details.

sblom
- 26,911
- 4
- 71
- 95