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
'Declaration
Public Function Add ( _
name As String, _
handlerType As Type _
) As Integer
public int Add(
string name,
Type handlerType
)
public:
int Add(
String^ name,
Type^ handlerType
)
member Add :
name:string *
handlerType:Type -> int
public function Add(
name : String,
handlerType : Type
) : int
Parameters
name
Type: StringThe name of the event to add.
handlerType
Type: TypeThe type of delegate this event represents.
Return Value
Type: Int32
The index at which the value has been added.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | name or handlerType is nulla null reference (Nothing in Visual Basic). |
ArgumentException | handlerType 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.