Reputation: 277
Edit: It is my own mistake (combined with some unexpected changes outside). please ignore this post and sorry for inconvenience!
Before I used to just pass this method:
string DoSomething(string)
Now the vendor added another overload like void DoSomething(string, string)
. I tried to pass the method as a parameter but the compiler complains it cannot convert the method group,
which makes sense I guess since DoSomething
now has 2 signatures.
The question is, how do I pass just one signature
?
Upvotes: 0
Views: 124
Reputation: 2975
I believe you should define your parameters as either Action<string> or Action<string, string> depending on which method you wish to call.
Upvotes: 1