System.Reflection.Emit.TypeBuilder.DefineConstructor C# (CSharp) Method

DefineConstructor() public method

public DefineConstructor ( System attributes, System callingConvention, System parameterTypes ) : System.Reflection.Emit.ConstructorBuilder
attributes System
callingConvention System
parameterTypes System
return System.Reflection.Emit.ConstructorBuilder
        public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes) { throw null; }
        public System.Reflection.Emit.ConstructorBuilder DefineConstructor(System.Reflection.MethodAttributes attributes, System.Reflection.CallingConventions callingConvention, System.Type[] parameterTypes, System.Type[][] requiredCustomModifiers, System.Type[][] optionalCustomModifiers) { throw null; }

Same methods

TypeBuilder::DefineConstructor ( System attributes, System callingConvention, System parameterTypes, System requiredCustomModifiers, System optionalCustomModifiers ) : System.Reflection.Emit.ConstructorBuilder

Usage Example

Example #1
0
 /// <summary>
 /// Adds a new public constructor to the class, with the given parameters.
 /// </summary>
 /// <param name="parameterTypes">The types of the parameters of the method.</param>
 /// <returns>The defined constructor.</returns>
 public ConstructorBuilderHelper DefinePublicConstructor(params Type[] parameterTypes)
 {
     return(new ConstructorBuilderHelper(
                this,
                _typeBuilder.DefineConstructor(
                    MethodAttributes.Public, CallingConventions.Standard, parameterTypes)));
 }
All Usage Examples Of System.Reflection.Emit.TypeBuilder::DefineConstructor