.Net Core dynamically compile C# code passed in as a string

后端 未结 1 1220
暖寄归人
暖寄归人 2021-01-22 20:31

I\'d like to store Code for C# Objects or Method in strings and dynamically create an object and call the method from a Parent/Main Application running in .NET Core.

So

相关标签:
1条回答
  • 2021-01-22 20:44

    Yes. There's an example of how to do it using Roslyn and Reflection here: https://msdn.microsoft.com/en-us/magazine/mt808499.aspx

    0 讨论(0)
提交回复
热议问题