NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Type.GetEvent (String, BindingFlags)

When implemented by a derived class, returns the EventInfo object representing the specified event, using the specified binding constraints.

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

Parameters

name
The String containing the name of an event which is declared or inherited by the current Type.
bindingAttr
A bit mask comprised of one or more BindingFlags that specify how the search is conducted.

-or-

zero, to conduct a case-sensitive search for public events.

Return Value

The EventInfo object representing the specified event which is declared or inherited by the current Type, if found; otherwise, a null reference (in Visual Basic Nothing).

Exceptions

Exception Type Condition
ArgumentNullException name is a null reference (Nothing).
SecurityException The BindingFlags value Public is used but the caller does not have ReflectionPermission to reflect non-public members outside the current assembly.

Remarks

Abstract. This method must be implemented by a derived class.

The following BindingFlags filter flags can be used to define which events should be included in the search:

The following BindingFlags modifier flags can be used to change how the search works:

See BindingFlags for more information.

See Also

Type Class | Type Members | System Namespace | Type.GetEvent Overload List