Hello everybody
this works
public event Func<int,int> createEvents;
but why not this ?
public event Action<int> createEvents;
Hello everybody
this works
public event Func<int,int> createEvents;
but why not this ?
public event Action<int> createEvents;
public event Action<int> CreateEvents;
Is completely valid. Maybe your Event Handling method does not match with the Action<T>
delegate.
Maybe you have something like this:
public event Action<int> CreateEvents;
public event Func<int, int> CreateEvents2;
public int OnCreateEvents2(int value)
{
Func<int, int> handler = CreateEvents2;
if (handler != null) return handler(value);
return 0;
}
public void OnCreateEvents(int value)
{
Action<int> handler = CreateEvents;
if (handler != null) handler(value);
}