how to declare custom event in interface

I

Ignacio Machin ( .NET/ C# MVP )

hey all,
i have a working example of a simple event delegation:

http://pastebin.com/m104a6c1f

can someone please show me how to define my custom event in an interface?

thanks,
rodchar

public interface ISystemEditorView {

event EventHandler<InitializeEventArgs> Initialize;

event EventHandler<InitializeDataEventArgs> InitializeData;
}
 
I

Ignacio Machin ( .NET/ C# MVP )

hey all,
i have a working example of a simple event delegation:

http://pastebin.com/m104a6c1f

can someone please show me how to define my custom event in an interface?

thanks,
rodchar

of course, you have to define your classes deriving from EventArgs:

public class InitializeEventArgs: EventArgs {

private Form form;

public Form Form {
get { return form; }
set { form = value; }
}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top