When input a list in the new RhinoCode component for GH and set the acess to List
, I do not actually get a list in the code. Instea it is defined as: System.Collections.Generic.IEnumerable
.
if you run the following simple script:
object item = x[0];
a = item;
you get the error
Compile Error
Cannot apply indexing with [] to an expression of type 'IEnumerable<object>' (Error CS0021) rhinocode:///grasshopper/1/ca315472-c3e8-419e-8f8c-bbeb764b7c25/2140d450-8add-4bb8-9817-10f6df7120bb:[56:19]
it seems that IEnumerables cannot be indexed like lists. Is this a bug or a feature?
p.s.: and yes the error points to the wrong line (56), which does not even exist…