摘要: 通常有: string str=""; 1、if(str=="") 2、if(str==String.Empty) 3、if(str.length==0) 三种方法的效果一样,都可以判断字符串是否为空,但性能上有所不同,因为整数判断等于最快,没有经过实例化等复杂的过程,所以第三种方法str.Leng 阅读全文
posted @ 2025-12-05 14:47 aicaiming 阅读(0) 评论(0) 推荐(0)