Having trouble assigning to a generic delegate in C# -



Having trouble assigning to a generic delegate in C# -

my problem follows:

public abstract class {} public class b : { public static ilist<b> mymethod(){ homecoming new list<b>();} } public delegate ilist<t> mydelegate<t>() t : a; ... public static void calledmethod<t>() t : a{ mydelegate<t> del = b.mymethod; // doesn't work }

can explain best way work?

thanks help.

edited prepare example.

here's why not work

public class c: {} calledmethod<c>();

this means del of type mydelegate<c> not work b.mymethod because c not b.

c#

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -