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.
Yeah, Java almost had me quit programming as a career before I discovered Python and realized that coding could actually be enjoyable instead of a miserable process.
View all comments
Show parent comment
9
u/DarthCloakedGuy 3d ago
Nothing made me love Python like learning C# and C++, ngl