Beispiel #1
0
 static void RubyFuncExample()
 {
     var product1 = new Product("P1", 10.00M);
     var product2 = new Product("P2", 6.99M);
     decimal total = RubyExampleCode.AddPrices(product1, product2);
     Console.WriteLine("Total price is: ${0:f}", total);
 }
Beispiel #2
0
 public static decimal AddPrices(Product product1, Product product2)
 {
     Func<dynamic, dynamic, decimal> addPricesFunc = _scope.GetVariable("addPrices");
     decimal total = addPricesFunc(product1, product2);
     return total;
 }