How to declare generic event for generic delegate in c#

后端 未结 6 2001
不思量自难忘°
不思量自难忘° 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:37

    Except as part of generic types (i.e.

    class Foo { public event SomeEventType SomeEventName; }
    

    ) there is no such thing as generic properties, fields, events, indexers or operators (only generic types and generic methods). Can the containing type here be generic?

提交回复
热议问题