简体   繁体   中英

How to call a function, defined in c# from boo?

I'm using Boo as the script engine in my C# program where I need to run user-defined scripts. How can I call a function which is defined in my C# code, from inside the Boo script?

You should import assembly with the class defining necessary method. Than create instance of the class and call method or just call it if it's static. Another way it's add call to the function to implicit base class if you are using Rhino DSL. Anyway, it would be good to know more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM