How I can use Add-Type in powershell through command line in order to execute VB.NET or C# (or JScript.net) code?
问题 Here's the MS documentation concerning Add-Type So I'm trying to add type through command line: >powershell Add-Type -TypeDefinition "public class T{public static int Add(int a, int b){return (a + b);}}" -Language CSharp or >powershell Add-Type -TypeDefinition "@"""public class T{public static int Add(int a, int b){return (a + b);}}"""@" -Language CSharp or >powershell Add-Type -TypeDefinition "@"""public class T{public static int Add(int a, int b){return (a + b);}}"""@" -Language CSharp or