Emitting a Module Constructor?

27 views
Skip to first unread message

Philip_L

unread,
Jun 2, 2009, 8:40:39 AM6/2/09
to mono-cecil
How do you emit a module constructor with Cecil?

Is it just some static method named ".cctor" defined on the special
"<Module>" type in a given assembly?

Lotfi Gheribi

unread,
Jun 2, 2009, 8:44:47 AM6/2/09
to mono-...@googlegroups.com
> How do you emit a module constructor with Cecil?
>
> Is it just some static method named ".cctor" defined on the special
> "<Module>" type in a given assembly?

Yep

Jb Evain

unread,
Jun 2, 2009, 8:55:47 AM6/2/09
to mono-...@googlegroups.com
Hey,

As Lotfi said, yes. Just note that you can have only one of those, and
that it have to be SpecialName | RTSpecialName.

--
Jb Evain <j...@nurv.fr>

Reply all
Reply to author
Forward
0 new messages