Are EventArg classes needed now that we have generics

前端 未结 4 826
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-29 06:31

With generics, is there ever a reason to create specific derived EventArg classes

It seems like now you can simply use them on the fly with a generic implementation.

4条回答
  •  忘掉有多难
    2020-12-29 07:01

    As TcKs already said: Use EventArgs if you only need to pass one value, otherwise derive from EventArgs (or EventArgs, whatever you want).

提交回复
热议问题