← Back to context

Comment by ZenoArrow

4 days ago

> I only really wish C# would’ve been directly integrated as an alternative scripting language in PowerShell.

You can embed C# in PowerShell scripts, and you have been able to do so for a long time. This webpage has a couple of examples of how this can work:

https://blog.nuvotex.de/run-c-inside-powershell/

That's not "embedding C#". That's runtime loading of .NET assemblies, which every .NET language--including PowerShell--can do.

  • It is embedding C#, if it was embedding assemblies it would be embedding compiled code. It's no different from inlining assembly in C.