<PackageReference Include="System.Reflection.Emit.ILGeneration" Version="4.7.0-preview3.19551.4" />

CustomAttributeBuilder

public class CustomAttributeBuilder
Helps build custom attributes.
public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs)

Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute and the arguments to the constructor.

public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs, FieldInfo[] namedFields, object[] fieldValues)

Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, and a set of named field/value pairs.

public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues)

Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, and a set of named property or value pairs.

public CustomAttributeBuilder(ConstructorInfo con, object[] constructorArgs, PropertyInfo[] namedProperties, object[] propertyValues, FieldInfo[] namedFields, object[] fieldValues)

Initializes an instance of the CustomAttributeBuilder class given the constructor for the custom attribute, the arguments to the constructor, a set of named property or value pairs, and a set of named field or value pairs.