Yea.Reflection.Emit.TypeBuilder.CreateMethod C# (CSharp) Method

CreateMethod() public method

Creates a method
public CreateMethod ( string name, MethodAttributes attributes = MethodAttributes.Public|MethodAttributes.Virtual, Type returnType = null, IEnumerable parameterTypes = null ) : IMethodBuilder
name string Method name
attributes MethodAttributes attributes for the method (public, virtual, etc.)
returnType System.Type Return type
parameterTypes IEnumerable Parameter types
return IMethodBuilder
        public virtual IMethodBuilder CreateMethod(string name,
                                                   MethodAttributes attributes =
                                                       MethodAttributes.Public | MethodAttributes.Virtual,
                                                   Type returnType = null, IEnumerable<Type> parameterTypes = null)
        {
            var returnValue = new MethodBuilder(this, name, attributes, parameterTypes, returnType);
            Methods.Add(returnValue);
            return returnValue;
        }