Export (0) Print
Expand All

TypeBuilder.GetEvent Method (String, BindingFlags)

.NET Framework 1.1

Returns the event with the specified name.

[Visual Basic]
Overrides Overloads Public Function GetEvent( _
   ByVal name As String, _
   ByVal bindingAttr As BindingFlags _
) As EventInfo
[C#]
public override EventInfo GetEvent(
 string name,
 BindingFlags bindingAttr
);
[C++]
public: EventInfo* GetEvent(
 String* name,
 BindingFlags bindingAttr
);
[JScript]
public override function GetEvent(
   name : String,
 bindingAttr : BindingFlags
) : EventInfo;

Parameters

name
The name of the event to get.
bindingAttr
This invocation attribute. This must be a bit flag from BindingFlags: InvokeMethod, NonPublic, and so on.

Return Value

Returns an EventInfo object representing the event declared or inherited by this type with the specified name. If there are no matches, then an empty array is returned.

Exceptions

Exception Type Condition
NotSupportedException This method is not implemented for incomplete types.

Remarks

Retrieve the type using GetType or GetType and use reflection on the retrieved type.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

TypeBuilder Class | TypeBuilder Members | System.Reflection.Emit Namespace | TypeBuilder.GetEvent Overload List

Show:
© 2015 Microsoft