J
John Smith
I have an event in an interface, how do I implement this event in a
class? I have tried implements keyword and does not work.
public enum ActionEnum {Added, Removed};
public class ListChangedEventArgs : System.EventArgs
{
public Employee Item;
public ActionEnum Action;
}
public delegate void ListChangedEventHandler(object sender,
ListChangedEventArgs e);
public interface IServices
{
/// <summary>
/// Gets a list of all emplyees currently held on the server.
/// </summary>
/// <returns></returns>
System.Collections.ArrayList GetAllEmplyees( );
/// <summary>
/// Occurs when the list of employees maintained on the server
changes.
/// This is mainly triggered when a new employee is added or an
existing one
/// is removed from the list.
/// </summary>
event ListChangedEventHandler ListChanged;
}
class? I have tried implements keyword and does not work.
public enum ActionEnum {Added, Removed};
public class ListChangedEventArgs : System.EventArgs
{
public Employee Item;
public ActionEnum Action;
}
public delegate void ListChangedEventHandler(object sender,
ListChangedEventArgs e);
public interface IServices
{
/// <summary>
/// Gets a list of all emplyees currently held on the server.
/// </summary>
/// <returns></returns>
System.Collections.ArrayList GetAllEmplyees( );
/// <summary>
/// Occurs when the list of employees maintained on the server
changes.
/// This is mainly triggered when a new employee is added or an
existing one
/// is removed from the list.
/// </summary>
event ListChangedEventHandler ListChanged;
}