[Mono-list] MonoObject of type System.Type to MonoClass (C)

Paolo Molaro lupus at ximian.com
Fri Dec 15 09:13:40 EST 2006

On 12/15/06 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.
> How can I do it?

In C# code do:
	IntPtr value = type.TypeHandle.Value;

value is a MonoType* and you can call mono_class_from_mono_type (value)
to get a MonoClass*.
Poking into MonoReflectionType* is going to break.


lupus at debian.org                                     debian/rules
lupus at ximian.com                             Monkeys do it better

More information about the Mono-list mailing list