interface containing events

P

puzzlecracker

I want interface, that in addition to providing methods declarion,
also contain events:


interface Connection{

public event MyDelegateHandler handler;
public event MyDelegateHandler2 handler2;

public void Method1();
public void Method2();
}

do you also think it's a good idea to create a separate interface for
delegates and have connection class inherit from it?

thanks
 
R

raylopez99

I want interface, that in addition to providing methods declarion,
also contain events:

interface Connection{

    public event MyDelegateHandler handler;
    public event MyDelegateHandler2 handler2;

    public void Method1();
    public void Method2();

}

do you also think it's a good idea to create a separate interface for
delegates and have connection class inherit from it?

thanks

In interface is simply a design specification. Like a virtual class
in a base class that must be written in all derived classes. As for
'good idea', I don't have an opinion. Why would not writing it be a
'bad idea'?

RL
 

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