VirtualTypeBuilder.MethodInfoCollection.Add Method (String, Type, array<Type )
Adds a MethodInfo to the end of the collection.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Public Function Add ( _
name As String, _
returnType As Type, _
parameterTypes As Type() _
) As Integer
public int Add(
string name,
Type returnType,
Type[] parameterTypes
)
public:
int Add(
String^ name,
Type^ returnType,
array<Type^>^ parameterTypes
)
member Add :
name:string *
returnType:Type *
parameterTypes:Type[] -> int
public function Add(
name : String,
returnType : Type,
parameterTypes : Type[]
) : int
Parameters
name
Type: System.StringThe name of the method to add.
returnType
Type: System.TypeThe return type of the method. This should be typeof(void) for void return types.
- parameterTypes
Type: array<System.Type[]
Return Value
Type: System.Int32
The index at which the value has been added.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name is nulla null reference (Nothing in Visual Basic). -or- returnType is nulla null reference (Nothing in Visual Basic). -or- An element in paramTypes is nulla null reference (Nothing in Visual Basic). paramTypes property may be nulla null reference (Nothing in Visual Basic). |
ArgumentException | returnType is not a run-time type. |
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.