Visual Guard Class Library Documentation

VGReflectionHelper.GetEventInfo Method 

Gets an EventInfo object representing the event with the specified name for the specified target.

public static EventInfo GetEventInfo(
   Type target,
   String eventName
);

Parameters

target
The object whose field will be returned
eventName
A string containing the name of the event in dotted-quad notation(e.g. fieldname.subfieldname.eventname).

Return Value

An EventInfo object representing the event with the specified name for the specified target, if it found; otherwise, null.

Example

EventInfo info = VGReflectionHelper.GetEventInfo(typeof(Form1), "userControl1.button1.Click");

See Also

VGReflectionHelper Class | Novalys.VisualGuard.Security Namespace