是否可以将 PowerShell 代码 .PS1 转换为 C# 代码?
我一直在谷歌上寻找它,但我总是发现相反。
Reflector有 AddIn to convert DLL to PS Code ,所以我认为这是可能的..
最佳答案
你可以试试这个 Visual Studio 代码扩展:PowerShell Pro Tools for VS Code https://ironmansoftware.com/powershell-pro-tools-for-visual-studio-code/
Convert between C# and PowerShell code to easily take snippets of either language and convert it to the other. Quickly create P\Invoke functions in PowerShell from C# snippets found on sites like Pinvoke.net.
关于c# - 如何将 Powershell 转换为 C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35630711/