VirtualTypeBuilder::MethodInfoCollection::Add Method (String^, Type^, array<Type^>^, array<Attribute^>^)

 

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)

public:
int Add(
	String^ name,
	Type^ returnType,
	array<Type^>^ parameterTypes,
	array<Attribute^>^ attributes
)

Parameters

name
Type: System::String^

The name of the method to add.

returnType
Type: System::Type^

The return type of the method. This should be typeof(void) for void return types.

paramTypes

The types of the parameters to this method. This can be null or an empty array to declare no parameters.

attributes
Type: array<System::Attribute^>^

This parameter is used to configure the class member appropriately. The Add method only accepts the values of MemberAttributes that fit into the AccessMask or ScopeMask categories.

Return Value

Type: System::Int32

The index at which the value has been added.

Exception Condition
ArgumentNullException

name is null.

-or-

returnType is null.

-or-

An element in paramTypes is null.

-or-

An element in attributes is null.

attributes and paramTypes properties may be null.

ArgumentException

handlerType is not a run-time type.

Return to top
Show: