Using Mono.Cecil I can iterate over the fields on System.Collections.Generic.List
(_items
, _size
, _version
, etc.), however if I try to use them I always get the exception
Member 'T[] System.Collections.Generic.List`1::_items' is declared in another module and needs to be imported
I have two questions regarding this:
- Is it not possible to access the underlying fields of the generics?
- If it is possible, what would the import statement look like for this?
I've successfully accessed private members on objects (as long as they're not compiler generated), so I'm assuming (1) is ok. I've also successfully imported things, although I admit my understanding of how the import is working is shaky (aka "if it gives an error, just try importing it").