Octal equivalent in C#

前端 未结 5 952
名媛妹妹
名媛妹妹 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:49

    No, there are no octal numbers in C#.

    Use public static int ToInt32(string value, int fromBase);

    fromBase
    Type: System.Int32
    The base of the number in value, which must be 2, 8, 10, or 16.
    

    MSDN

提交回复
热议问题