SignatureHelper.GetMethodSigHelper Method (Module, Type, array<Type[])
Microsoft Silverlight will reach end of support after October 2021. Learn more.
Returns a signature helper for a method with a standard calling convention, given the method's module, return type, and argument types.
Namespace: System.Reflection.Emit
Assembly: mscorlib (in mscorlib.dll)
Syntax
'Declaration
<SecuritySafeCriticalAttribute> _
Public Shared Function GetMethodSigHelper ( _
mod As Module, _
returnType As Type, _
parameterTypes As Type() _
) As SignatureHelper
[SecuritySafeCriticalAttribute]
public static SignatureHelper GetMethodSigHelper(
Module mod,
Type returnType,
Type[] parameterTypes
)
Parameters
- mod
Type: System.Reflection.Module
The ModuleBuilder that contains the method for which the SignatureHelper is requested.
- returnType
Type: System.Type
The return type of the method, or nulla null reference (Nothing in Visual Basic) for a void return type (Sub procedure in Visual Basic).
- parameterTypes
Type: array<System.Type[]
The types of the arguments of the method, or nulla null reference (Nothing in Visual Basic) if the method has no arguments.
Return Value
Type: System.Reflection.Emit.SignatureHelper
The SignatureHelper object for a method.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | mod is nulla null reference (Nothing in Visual Basic). -or- An element of parameterTypes is nulla null reference (Nothing in Visual Basic). |
ArgumentException | mod is not a ModuleBuilder. |
Remarks
This overload creates a signature with a standard calling convention.
To create a method signature with custom modifiers, use the GetMethodSigHelper(Module, CallingConventions, Type) method overload and then use the AddArgument(Type, array<Type[], array<Type[]) or AddArguments(array<Type[], array<array<Type[][], array<array<Type[][]) method overloads to add arguments with custom modifiers.
Version Information
Silverlight
Supported in: 5, 4, 3
Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also