Habe gerade bei Chris Take was interessantes gesehen.
public class GenericEventArg<T> : EventArgs
{
public GenericEventArg(T value)
{
Value = value;
} public T Value { get; set; }
}
public event EventHandler<GenericEventArg<MyClass>> MyClassEvent;
public event EventHandler<GenericEventArg<List<string>>> StringListEvent;
public event EventHandler<GenericEventArg<int>> IntEvent;
Recent Comments