Octal equivalent in C#

前端 未结 5 934
名媛妹妹
名媛妹妹 2020-12-16 08:56

In C language octal number can be written by placing 0 before number e.g.

 int i = 012; // Equals 10 in decimal.

I found the e

5条回答
  •  春和景丽
    2020-12-16 09:41

    No there isn't, the language specification (ECMA-334) is quite specific.

    4th edition, page 72

    9.4.4.2 Integer literals

    Integer literals are used to write values of types int, uint, long, and ulong. Integer literals have two possible forms: decimal and hexadecimal.

    No octal form.

提交回复
热议问题