Generics in an Attribute?
-
I want to have a delegate inside an attribute public class MyAttribute : Attribute { public delegate T updater( T myVar); } is that possible?
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog
-
I want to have a delegate inside an attribute public class MyAttribute : Attribute { public delegate T updater( T myVar); } is that possible?
-------------------------------------------------------- 1 line of code equals many bugs. So don't write any!! My mad coder blog
Hello After some modification to your code it compiles. yes you can have generic delegates in attributes, yet why? Here is your code modified: public class MyAttribute : Attribute { public delegate T updater(T myVar); } Regards:rose: