两者有什么区别?我应该什么时候使用它们?
最佳答案
没有。
string.ToLower
在幕后调用 TextInfo.ToLower
。
来自 String.cs:
// Creates a copy of this string in lower case.
public String ToLower() {
return this.ToLower(CultureInfo.CurrentCulture);
}
// Creates a copy of this string in lower case. The culture is set by culture.
public String ToLower(CultureInfo culture) {
if (culture==null) {
throw new ArgumentNullException("culture");
}
return culture.TextInfo.ToLower(this);
}
关于c# - string.ToLower 和 TextInfo.ToLower 之间的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10785896/