public override (object, int) Decode(byte[] data, int position, bool packed) { UInt256 length; (length, position) = UInt256.DecodeUInt(data, position, packed); Array result = Array.CreateInstance(ElementType.CSharpType, (int)length); for (int i = 0; i < length; i++) { object element; (element, position) = ElementType.Decode(data, position, packed); result.SetValue(element, i); } return(result, position); }