C# string vs String, bool vs Boolean

This question already has an answer here:

  • What is the difference between String and string in C#? 59 answers

  • 它们是相同的东西 - string只是System.String的别名和System.Boolean bool


    They are exactly the same. But I think it's worth noting (in case you have a multi-language persuasion), that in Java, the boolean and Boolean types are not the same.


    bool is an alias for System.Boolean just as int is an alias for System.Int32. See a full list of aliases Here. and Example

    int x = 123;
    System.Int32 x = 123;
    
    链接地址: http://www.djcxy.com/p/3594.html

    上一篇: char和char有什么区别?

    下一篇: C#字符串与字符串,布尔与布尔