Search code examples
iosxamarin.ioscilil

Does MonoTouch support Module Initializers?


Just curious if MonoTouch has support for "Module Initializers"? http://blogs.msdn.com/b/junfeng/archive/2005/11/19/494914.aspx

Related question: Does Mono support "Module Initializers"?


Solution

  • Your first link answer, at least half, your own question. The Mono runtime supports Module Initializers and the test done (to prove this) was executed with Mono's JIT.

    MonoTouch uses the JIT when executing on the iOS simulator, so there's no reason why it would not work there.

    It likely works (or it's a bug) for devices too, i.e. where the AOT compiler is being used. As Jason said, it's a matter of testing it. If you cannot test it yourself simply fill a bug report and attach a (self-contained) test case to it and we'll confirm if it works (or keep the bug open until it does).