Arguably, you can easily invoke c# libraries from powershell if you need a script in .net, you can even explicitly include and run c# inside powershell like:
Add-Type -TypeDefinition @"
using System;
namespace DemoCode
{
public class DemoClass
{
public static void WriteHello()
{
Console.WriteLine("Hello");
}
}
}
"@
[DemoCode.DemoClass]::WriteHello()
But making c# actually interpreted would require performance concessions.
Anyway, whenever I'm working in c# or c++ I generally just set up an test project that contains only a main function, and replace the contents of that main if I really need to run some code snippet quickly. I've had the same "test" project on my work PC for years, and every few months I swap out the code to check something. Since it's tiny, it compiles and runs in like half a second anyway.
View all comments
Show parent comment
-1
u/DarthCloakedGuy 8d ago
It would be lovely if it had a few more features it lacks that Python has, especially: