C# and Java both support the same categories of literal values. No differences exist between the Boolean and Null literals in either language. Table 4-12 summarizes the key differences between Integer, Real, Character, and String literals.
Table 4-12. Literal Values
Category | Comments |
---|---|
Integer | C# adds support for unsigned integer and unsigned long literals. |
C# does not support octal representations of integer literals. | |
Real | C# adds support for decimal literals. Use the M or m suffix to specify a decimal literal. |
Character | C# does not support octal escape sequences to represent characters. |
In C#, the escape sequence |