How to get the element type of List<T> from MonoObject* #115970
Unanswered
ffbh123456
asked this question in
Q&A
Replies: 1 comment
-
runtime/src/mono/mono/metadata/class.c Lines 2163 to 2179 in d896e85 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a
MonoObject*
that represents aList<T>
from C#.I need to retrieve the element type
T
— specifically, get aMonoClass*
that represents the generic argument.Is there an API that can help with this?
So far, I can get the
MonoClass*
of the object usingmono_object_get_class(obj)
, but I haven’t found a clean way to extract the generic argument from there.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions