本文介绍了如何检查List()是空的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 嗨 我有 s = new 列表< string> ;() 返回 当我使用断点时 现在我似乎无法验证 s 使用 null 例如 if (result.s == null ) { errorText = 错误 } 否则 { // 在这里播放刽子手代码 } 它总是跳过if并跳转到else ... 解决方案 HiI have s=new List<string>()that returns "" when am using a breakpointNow I cant seem to validate "s" using nulleg if(result.s==null){errorText="error"}else{//Play hangman code here}It always skip the if and jumps to else... 解决方案 这篇关于如何检查List()是空的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!