Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

BeforeFieldInit.Fody

Fody addin.

Forces IL beforefieldinit attribute on types decorated with custom BeforeFieldInit attribute.

Usage

  1. Define custom BeforeFieldInit attribute:

    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
    public class BeforeFieldInitAttribute : Attribute
    {
    }
  2. Add new attribute to your class:

    [BeforeFieldInit]
    public class MyClass
    {
        static MyClass()
        {
            // Initialization code goes here...
        }
    }

Nuget package

Coming soon...

Links

Introduction to Fody

C# and beforefieldinit

About

Fody addin for controlling MSIL beforefieldinit attribute.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages