Need help defining an interface in C #

I have a data mapping application in which I need to implement custom functions as plugins. The name of the custom method that I need to execute will also appear in the mapping data. I know that I can call a method using the invoke command; but how can I guarantee that each method has a corresponding signature?

+3
source share
3 answers

First of all, I don’t think you should allow arbitrary names for overridden methods - just define the interface and save it simply.

You can define an interface with a method that returns a delegate to a method that does this work.

, MethodInfo , .

+1

, , . . , ( , ) . , , , , . , , .

+1

Source: https://habr.com/ru/post/1714142/


All Articles