C#String与string大小写的区别
2014-05-30 15:21
246 查看
1.tring是c#中的类,String是.net Framework的类(在c# IDE中不会显示蓝色)
2.# string映射为.net Framework的String
3.果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作。如果使用c#,建议使用string,比较符合规范
4.ing始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表System.String
5.sring是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以。
2.# string映射为.net Framework的String
3.果用string,编译器会把它编译成String,所以如果直接用String就可以让编译器少做一点点工作。如果使用c#,建议使用string,比较符合规范
4.ing始终代表 System.String(1.x) 或 ::System.String(2.0) ,String只有在前面有using System;的时候并且当前命名空间中没有名为String的类型(class、struct、delegate、enum)的时候才代表System.String
5.sring是关键字,String不是,也就是说string不能作为类、结构、枚举、字段、变量、方法、属性的名称,而String可以。
相关文章推荐
- C#String与string大小写的区别
- C#中,String和string的区别
- c#中String跟string的“区别”
- 转:C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- c#中String和string的区别
- c#中string与String的区别
- C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别[转贴]
- 转:C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- C#中String和string区别
- c#中String跟string的“区别”
- c#中String跟string的“区别”
- C#中,string str = null 与 string str =""的区别。
- c#中String与string的区别(收藏)
- 转:C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- C#中NULL,"",DBNULL,String.Empty,Convert.IsDBNull()的区别
- c#中String跟string的“区别” [ZT]
- c#中String跟string的“区别”
- c# 中string和String的区别