D
Derrick
How does one declare an event within an interface, so that every class which
implements that interface must implement that event? I think I just need to
specifiy the actual event as I would a function, but what about the
delegate?
Up to now, all my interfaces have only dealt with properties and functions.
Here's basically what I want to do (for example):
public interface IFoo
{
//Properties:
bool HasItems{get;}
Item[] GetItems{get;}
//Functions:
void AddItem(Item i);
//Events: --How do I do this? Where do I define the delegate?
void OnItemAdded(Item i);
}
Thanks,
Derrick
implements that interface must implement that event? I think I just need to
specifiy the actual event as I would a function, but what about the
delegate?
Up to now, all my interfaces have only dealt with properties and functions.
Here's basically what I want to do (for example):
public interface IFoo
{
//Properties:
bool HasItems{get;}
Item[] GetItems{get;}
//Functions:
void AddItem(Item i);
//Events: --How do I do this? Where do I define the delegate?
void OnItemAdded(Item i);
}
Thanks,
Derrick