c# - Function with 2 different generic objects -
i´m trying following:
i have class virtual method this:
public virtual event<t> execute<t>(t message)
and that´s want:
event t can different of t message. example: need function this:
public override event<bitmap> execute(string message)
but of course, following error "no suitable method found override".
is there way this? use 2 types of generic objects using override?
note: can change virtual method, other classes have inherit one.
thank you!
you don't need override it, override used change method inherited class. if understood correctly want overload method, omit override , type virtual instead.
public virtual event<bitmap> execute(string message)
when call function compiler choose appropriate method in dependence of number/types of values have passed method.
Comments
Post a Comment