摘要: 其实用过C#的人都知道它会建议你使用String.Length属性来判断字符串是否为空串,但你又是否明白其中的缘由呢?今天有点闲,特意写下这篇文章,希望有点帮助。1. 三种常用的字符串判空串方法:Length法:bool isEmpty = (str.Length == 0);Empty法:bool isEmpty = (str == String.Empty);General法:bool isE... 阅读全文