
C# 类型中大小写的区别
C#中有string也有String,有double也有Double等,不知道其中有什么区别?...
C#中有string也有String,有double也有Double等,不知道其中有什么区别?
展开
展开全部
string是String的别名。string是c#中的类,String是.net Framework的类(在c# IDE中不会显示蓝色)
c# string映射为.net Framework的String
如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作
如果使用c#,建议使用string,比较符合规范
string始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表System.String
string是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以
double也一样
c# string映射为.net Framework的String
如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作
如果使用c#,建议使用string,比较符合规范
string始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表System.String
string是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以
double也一样
参考资料: http://jameszou.javaeye.com/blog/207351
展开全部
# string是c#中的类,String是.net Framework的类(在c# IDE中不会显示蓝色)
# c# string映射为.net Framework的String
# 如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作
# 如果使用c#,建议使用string,比较符合规范
# string始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表 System.String
# string是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以
# c# string映射为.net Framework的String
# 如果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作
# 如果使用c#,建议使用string,比较符合规范
# string始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表 System.String
# string是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询