Section 2.4.4.2 (Integer literals) of the C# 5.0 specs states:
The type of an integer literal is determined as follows:
- If the literal has no suffix, it has the first of these types in which its value can be represented: int, uint, long, ulong.
- If the literal is suffixed by U or u, it has the first of these types in which its value can be represented: uint, ulong.
- If the literal is suffixed by L or l, it has the first of these types in which its value can be represented: long, ulong.
- If the literal is suffixed by UL, Ul, uL, ul, LU, Lu, lU, or lu, it is of type ulong.
So the first bullet applies to your case, as you have no suffix, and 1
fits into the first item in the list, int
, so the integer literal 1
is of type int
.