I\'ve found a way to run C# code directly in PowerShell. It doesn\'t need to change C# code to PowerShell code. It\'s very convenient, but I encounter the following problems