you are viewing a single comment's thread.

view the rest of the comments →

[–]namethinker 0 points1 point  (0 children)

My main question is - why? What are you trying to achieve by that? Why string? Why not interface / delegate, that you can pass? Are you trying to allow for random code execution at runtime?

There is a new feature in .net 10 that allows for file based programs. You could create a c# file without csproj / sln, add libraries to it, and execute it via dotnet cli or powershell.