How to declare generic event for generic delegate in c#

后端 未结 6 2000
不思量自难忘°
不思量自难忘° 2020-12-17 16:55

I have a user control which deals with fileupload. I have defined a delegate as follows

public delegate void FileUploadSuccess(T value,FileUploadTyp         


        
6条回答
  •  别那么骄傲
    2020-12-17 17:31

    I don't think this is possible.

    Event is like an instance of a delegate (roughly speaking), and an instance is a concrete implementation ( of a generic or a non-generic class).

    For better understanding of delegates and event, you can refer to this SO discussion.

提交回复
热议问题