摘要:
string.Empty不分配存储空间""分配一个长度为空的存储空间 所以一般用string.Empty为了以后跨平台,还是用string.empty在 C# 中,大多数情况下 "" 和 string.Empty 可以互换使用。比如:string s = "";string s2 = string.Empty;if (s == string.Empty) { //}if语句成立判定为空字符串的几种写法,按照性能从高到低的顺序是:s.Length == 0 优于 s == string.Empty 优于 s == "" 阅读全文
posted @ 2011-10-26 11:47
Yaoquan.Luo
阅读(361)
评论(0)
推荐(1)
浙公网安备 33010602011771号