I have this class:
public class GenericEventArgs<T> : EventArgs
{
public GenericEventArgs() : this(default(T)) {}
public GenericEventArgs(T value) { Value = value; }
public T Value { get; private set; }
}
And this event handler delegate for him:
public delegate void GenericEventHandler<T>(object sender, GenericEventArgs<T> e);
They are currently stored in a single file together in a namespace. Is it considered bad / dirty / etc? The reason, in general, I would say that each file should contain only one class. Therefore, to make it clean, I would prefer to have the class GenericEventArgsonly in the file. But then I have this delegate GenericEventHandler<T>that I'm not sure where I should put it. Should he have his own file? Only ... is this one line? (and of course the namespace)
How do you usually do this?
source
share