Byte []转换问题 [英] Byte [] issues in converting
本文介绍了Byte []转换问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何检查byte []是否具有情感。对于string是example.length == 0,byte []怎么样?
解决方案
尝试:byte [] data = GetData();
if (data == null || data.Length == 0 )
{
...
试试这个:
byte [] Attachment = null ;
if (附件!= null && Attachment.Length > 0 )
{
// 您的代码
}
else
{
// 其他代码
}
:) :) :)
只需检查,它会做,检查订单条件。
if (byteArray!= null && byteArray.Length > 0 )
How to you check if byte[] is emoty. For string is example.length == 0 , how about byte[]?
解决方案
Try:byte[] data = GetData(); if (data == null || data.Length == 0) { ...
Try this :
byte[] Attachment = null ; if (Attachment != null && Attachment.Length > 0) { //Your Code } else { //Code for else }
:) :) :)
Just check, it will do, do check the order conditions.
if (byteArray != null && byteArray.Length > 0)
这篇关于Byte []转换问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文