[Mono-dev] how to coerce MonoObject* holding a System.Type to MonoClass*
jonathan.shore at gmail.com
Mon Dec 12 21:50:05 EST 2011
I have a method call that returns System.Type. I want to make use of the
type and do some reflection from C++. Have code like this:
MonoClass* klass = (MonoClass*)mono_runtime_invoke (...);
I am pretty sure that the casting to MonoClass* is not appropriate. The
mono_runtime_invoke() function returns aMonoObject*. How do I coerce the
MonoObject* containing a reference to Type to MonoClass*. I want to be able
to be able to call:
mono_class_get_properties (type, &iter)
FYI: I posted this on stackoverflow @
anyone cares to answer.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list