开发者

calling methods at runtime

开发者 https://www.devze.com 2023-02-20 09:56 出处:网络
What is used to call methods at runtime? Can either one work a> Deleg开发者_JAVA百科ate b> Reflection APIIf you only have the method name (as a string) and an object of the type that implements the

What is used to call methods at runtime?

Can either one work a> Deleg开发者_JAVA百科ate b> Reflection API


If you only have the method name (as a string) and an object of the type that implements the method, then, yes you need Reflection. If you have a delegate, then you can invoke it directly.


You can use delegates and reflections to call methods at runtime.

0

精彩评论

暂无评论...
验证码 换一张
取 消