Hello,
I'm trying to access the primitive type of a data type that wraps it from an array of those Data's.
Made simple: Array of Datas that wrap a single primitive type.
My question is the following:
Why does the following work and the latter doesn't?The first gets the type of the data in the array (typeof(wrappedColumn[0])) and gets the primitive type (.fields[0].type) from the Data. Type columnType = typeof(wrappedColumn[0]).fields[0].type
Type columnType = typeof(wrappedColumn).fields[0].type.fields[0].type
The second gets the type of the array, which should contain a single field holding the cell type (typeof(wrappedColumn).fields[0].type), and gets the primitive type (.fields[0].type) from the Data as in the previous line. However, this results with an index out of bounds exception.
I am unsure, whether, I'm doing something wrong or something else is taking place.
If you are struggling to recreate the error I could provide the complete code.
Many thanks,
Sava
