Update BITBinary.cs

This commit is contained in:
CortexCore 2024-06-26 15:39:00 +08:00
parent 3d2d33a4bf
commit 46188dc637
1 changed files with 2 additions and 0 deletions

View File

@ -69,6 +69,8 @@ namespace BITKit
var arrayTypeName = reader.ReadString();
//获取数组类型
var arrayType = BITSharp.GetTypeFromFullName(arrayTypeName);
if(string.IsNullOrEmpty(arrayTypeName) || arrayType is null)
throw new Exception($"未找到类型:{arrayTypeName}");
//创建数组实例
var array = Array.CreateInstance(arrayType, reader.ReadInt32());
//循环Reader