calling the function, which is stored in a string variable

前端 未结 2 846
借酒劲吻你
借酒劲吻你 2021-01-24 05:15

it may be a duplicate of

How to dynamically call a class' method in .NET?

and of

how to achieve calling a function dynamically, thats right the fun

2条回答
  •  清酒与你
    2021-01-24 06:15

    I see 2 solutions:

    1. you need to map function id to real function name
    2. call type.GetMethods() to get list of all methods and choose right one

提交回复
热议问题