In the past, we created events using the following format …
public delegate void EventListener(object src, object context);
public event EventListener SomeEvent;
public void Init()
{
SomeEvent += OnSomeEvent;
}
public void OnSomeEvent(object src, object context)
{
}
With lambda expressions, we can do the following …
public event Action<object, object> SomeEvent;
public void Init()
{
SomeEvent += (s,c) => {};
}
No doubt there are other ways to do it, but I find this simpler and more concise.


