Maciej Piechotka wrote:
> I have a collection which I got from dll. However I have a objects of
> System.Type and I want to have MonoClass.
System.Type is represented by MonoReflectionType* in the embedded
API. Unfortunately there is no documented/public way to obtain
the MonoType* from a MonoReflectionType*, at least I didn't
find one.
The workaround is to declare this in your code:
/*
* FIXME: propose mono_reflection_type_get_XYZ () accessors.
*/
struct _MonoReflectionType {
MonoObject object;
MonoType *type;
};
Supposing your System.Type is in the var `obj', you can
obtain the MonoClass* this way:
mono_class_from_mono_type ((MonoReflectionType*)obj)->type);
Robert
_______________________________________________
Mono-list maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list