string是 C# 中的别名,用于
System.String.
所以从技术上讲,没有区别。这就像
intvs.
System.Int32.
就指南而言,通常建议
string您在引用对象时使用。
例如
string place = "world";
同样,我认为
String如果您需要专门引用该类,通常建议使用它。
例如
string greet = String.Format("Hello {0}!", place);
string是 C# 中的别名,用于
System.String.
intvs.
System.Int32.
就指南而言,通常建议
string您在引用对象时使用。
例如
string place = "world";
同样,我认为
String如果您需要专门引用该类,通常建议使用它。
例如
string greet = String.Format("Hello {0}!", place);