关于空字符串

运行弹出提示“yes!”

定为空字符串的几种写法,按照性能从高到低的顺序是:


s.Length == 0 优于 s == string.Empty 优于 s == ""

posted @ 2010-03-08 15:16  软践  阅读(183)  评论(0编辑  收藏  举报