diff --git a/src/src/primitive/partials/PrimitiveGet.cs b/src/src/primitive/partials/PrimitiveGet.cs index aaf5c38..b714463 100644 --- a/src/src/primitive/partials/PrimitiveGet.cs +++ b/src/src/primitive/partials/PrimitiveGet.cs @@ -578,12 +578,13 @@ public object Array(Type type) if (type == null) return null; if (!type.IsArray) return null; Type childrenType = type.GetElementType(); + Type listType = typeof(List<>).MakeGenericType(childrenType); try { if (!IsValidPrefix(Prefix.Array)) throw new InvalidDataException(); - var list = new List(); + var list = (List)Activator.CreateInstance(listType); var objectCount = BitConverter.ToInt32(VaultArray, Position); Position += sizeof(int);