But why to store C# code in a QM macro? You can store it in LA. I want to know some reasons why people want to pass C# code to LA to compile and execute.
In LA Cookbook there is recipe "Use C# compiler at run time". Using that code you can create a function that compiles and executes code passed from QM or elsewhere. Will need to install the NuGet package (the easy way) or add references to the LA compiler dlls; they are in LA subfolder Roslyn.
The first call will take 1 or several seconds depending on computer speed. Then about 100 ms.
When C# code is in LA, the speed is about 1 ms. First time a little slower.
In LA Cookbook there is recipe "Use C# compiler at run time". Using that code you can create a function that compiles and executes code passed from QM or elsewhere. Will need to install the NuGet package (the easy way) or add references to the LA compiler dlls; they are in LA subfolder Roslyn.
The first call will take 1 or several seconds depending on computer speed. Then about 100 ms.
When C# code is in LA, the speed is about 1 ms. First time a little slower.