VirtualTypeBuilder.EventInfoCollection.Add Method (String, Type)

Adds an EventInfo to the end of the collection.

Namespace:  Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

Syntax

'宣言
Public Function Add ( _
    name As String, _
    handlerType As Type _
) As Integer
'使用
Dim instance As VirtualTypeBuilder..::.EventInfoCollection
Dim name As String
Dim handlerType As Type
Dim returnValue As Integer

returnValue = instance.Add(name, handlerType)
public int Add(
    string name,
    Type handlerType
)
public:
int Add(
    String^ name, 
    Type^ handlerType
)
public function Add(
    name : String, 
    handlerType : Type
) : int

Parameters

  • handlerType
    Type: System.Type

    The type of delegate this event represents.

Return Value

Type: System.Int32

The index at which the value has been added.

Exceptions

Exception Condition
ArgumentNullException

name or handlerType is a null reference (Nothing in Visual Basic).

ArgumentException

handlerType is not a run-time type.

Permissions

See Also

Reference

VirtualTypeBuilder.EventInfoCollection Class

VirtualTypeBuilder.EventInfoCollection Members

Add Overload

Microsoft.VisualStudio.Shell.Design Namespace