1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
$CodigoC = @" using System; public class Suma { public static void Main() { int x = 3; int y = 2; int a = Sum(x,y); Console.WriteLine(a); } public static int Sum(int x, int y) { return x + y; } } "@ Add-Type -TypeDefinition $CodigoC -ErrorAction SilentlyContinue [Suma]::Main() |