See Also: CodeDelegateCreateExpression Members
System.CodeDom.CodeDelegateCreateExpression represents code that creates a delegate. System.CodeDom.CodeDelegateCreateExpression is often used with System.CodeDom.CodeAttachEventStatement or System.CodeDom.CodeRemoveEventStatement to represent an event handler to attach or remove from an event.
The CodeDelegateCreateExpression.DelegateType property specifies the type of delegate to create. The CodeDelegateCreateExpression.TargetObject property indicates the object that contains the event-handler method. The CodeDelegateCreateExpression.MethodName property indicates the name of the event-handler method whose method signature matches the method signature of the delegate.
In C#, a delegate creation expression is typically of the following form: new EventHandler(this.HandleEventMethod). In Visual Basic, a delegate creation expression is typically of the following form: AddressOf Me.HandleEventMethod.