【发布时间】:2021-12-12 17:57:19
【问题描述】:
我使用 sqlite 作为数据库。在我的数据库中,其中一个值为 null。它的数据类型是字节。以下是我用来检索值的代码,
byte[] blobValue = new byte[iData.GetBytes(4,0,null,0,int.MaxValue)-1];
不幸的是,由于数据为空,它会引发“无效的强制转换异常”。如果数据库中的数据为空,如何返回null?
【问题讨论】:
标签: c# sqlite unity3d idatareader