NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

TypeBuilder.DefineMethod (String, MethodAttributes, CallingConventions, Type, Type[])

Adds a new method to the class, with the given name and method signature.

[Visual Basic]
Overloads Public Function DefineMethod( _
   ByVal name As String, _
   ByVal attributes As MethodAttributes, _
   ByVal callingConvention As CallingConventions, _
   ByVal returnType As Type, _
   ByVal parameterTypes() As Type _
) As MethodBuilder
[C#]
public MethodBuilder DefineMethod(
   string name,
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type returnType,
   Type[] parameterTypes
);
[C++]
public: MethodBuilder* DefineMethod(
   String* name,
   MethodAttributes attributes,
   CallingConventions callingConvention,
   Type* returnType,
   Type* parameterTypes[]
);
[JScript]
public function DefineMethod(
   name : String,
   attributes : MethodAttributes,
   callingConvention : CallingConventions,
   returnType : Type,
   parameterTypes : Type[]
) : MethodBuilder;

Parameters

name
The name of the method.
attributes
The attributes of the method.
callingConvention
[To be supplied.]
returnType
The return type of the method.
parameterTypes
The types of the parameters of the method.

Return Value

The defined method.

Exceptions

Exception Type Condition
ArgumentNullException if name is a null reference (in Visual Basic Nothing)
InvalidOperationException if the type was previously created using CreateType

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace | TypeBuilder.DefineMethod Overload List