检查字符串数组是否为空的代码 [英] Code for checking whether string array is empty or not
本文介绍了检查字符串数组是否为空的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
请使用c#向我发送代码以检查字符串数组是否为空.
谢谢
Hi,
Please send me the Code for checking whether string array is empty or not using c#.
Thanks
推荐答案
使用字符串数组的length属性
如果数组为空,则长度为零.
use length property of string array
if array is empty then length is zero.
这可能会有所帮助,
如何检查字符串数组是否为Null或空吗?
:)
It might be helpful,
how to check string array is Null or Empty?
:)
试试这个
for(int i=0;i< arr.length;15;i++){
if(arr[i]==null)
//Do the task
}
这篇关于检查字符串数组是否为空的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文