public override int ReadAttribute(byte[] data, int offset, FieldInfo f, object target, Dictionary <string, byte[]> other) { Array array = Array.CreateInstance(t, count); // TODO: Support non-primitive arrays for (int i = 0; i < count; i++) { array.SetValue(BinaryStructure.ConvertValue(t, data, offset), i); offset += BinaryConversion.sizes[t]; } f.SetValue(target, array); return(offset); }