[Mono-list] RuntimeHelpers?

A Rafael D Teixeira rafaelteixeirabr@hotmail.com
Thu, 07 Feb 2002 17:43:25 -0200


There is a property of System.Type to get the TypeHandle

[C#]
[Serializable]
[ClassInterface(ClassInterfaceType.AutoDual)]
public abstract RuntimeTypeHandle TypeHandle {get;}

So get the Type of the class you and to construct and then the TypeHandle 
property to use with RunClassConstructor...

Rafael Teixeira
Brazilian Developer

>From: Morten Sylvest Olsen <pbk1105@pbk.dk>
>Reply-To: <mortenolsen@mail.com>
>To: <mono-list@ximian.com>
>Subject: [Mono-list] RuntimeHelpers?
>Date: Wed, 6 Feb 2002 16:49:44 +0100 (CET)
>
>Maybe somebody could enligthen me on this? It might be a bit off-topic,
>and/or stupid.
>
>System.Runtime.CompilerServices.RunClassConstructor (RuntimeTypeHandle
>type)
>
>is a method to explicitly invoke a _class_ constructor, but it takes a
>RuntimeTypeHandle, and ehhh, how do I get a RuntimeTypeHandle to a
>_class_ without having a reference to an object?
>
>Thanks.
>
>- Morten
>


_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail. 
http://www.hotmail.com