System.NullReferenceException: 未将对象引用设置到对象的实例
float[] a ={ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
byte[] pReadBuffer = new byte[184];
ZSPLC.ReadByteFromDB(1, 8, 184, out pReadBuffer);
for (int i = 0; i < 10; i++)
{
int b = 20 * i;
byte[] c =new byte[4]{ pReadBuffer[b + 3], pReadBuffer[b + 2], pReadBuffer[b + 1], pReadBuffer[b] };
a[i] = System.BitConverter.ToSingle(c, 0);
DataClass.RealData[i] = a[i];
}
运行以上代码 出现如题的错误。刚开始能正常运行,但在一段不确定的时间后就会出错。