c# - 如何将 Powershell 转换为 C#

标签 c# .net powershell dll

是否可以将 PowerShell 代码 .PS1 转换为 C# 代码?
我一直在谷歌上寻找它,但我总是发现相反。
ReflectorAddIn to convert DLL to PS Code ,所以我认为这是可能的..

最佳答案

你可以试试这个 Visual Studio 代码扩展:PowerShell Pro Tools for VS Code https://ironmansoftware.com/powershell-pro-tools-for-visual-studio-code/
enter image description here

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/

相关文章:

c# - 如何以编程方式读取 C# 中的 native DLL 导入?

powershell - 如何使用powershell遍历文件?

c# - 如何在多维数组上使用 LINQ 到 'unwind' 数组?

C# 将数据集插入 SQL 数据库

c# - 应用程序崩溃

.net - .net 项目使用 aop 的性能问题

c# - 是否有内置的 C# 方法可以将空字符串转换为空值?

windows - 每个开发人员都应该知道的 PowerShell 脚本

powershell - 为什么无法遍历磁盘大小?

c# - TPL 能否在多个线程上运行任务?