Skip to main content

Home/ Coders/ Group items tagged IL clr

Rss Feed Group items tagged

Joel Bennett

Module initializers in C# - 6 views

  •  
    One feature of the CLR that is not available in C# or VB.NET are module initializers (or module constructors). A module initializer is simply a global function which is named .cctor and marked with the attributes SpecialName and RTSpecialName. It is run when a module (each .NET assembly is comprised of one or more modules, typically just one) is loaded for the first time, and is guaranteed to run before any other code in the module runs, before any type initializers, static constructors or any other initialization code.
1 - 1 of 1
Showing 20 items per page