Paolo Molaro wrote: > 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. >
This requires either 2 mono_runtime_invoke calls on the MonoObject* of the certain System.Type or some managed glue. It would be nice to have an accessor for the MonoReflectionType->type member instead. Robert _______________________________________________ Mono-list maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-list
