static void Main(string[] args) { Valuesa v; v.a = 12; v.b = 23; v.c = 34; v.d = 45; v.e = 56; v.f = 67; v.g = 78; v.h = 89; ComplexDelegate d = new ComplexDelegate(Worker); d += new ComplexDelegate(Worker); d += new ComplexDelegate(Worker); float result = d( (float)1.5,2.5, v, 3.5,4.5,5.5,6.5,7.5,8.5,9.5,10.5, 11.5,12.5,13.5,14.5,15.5,16.5,17.5,(float)18.5); Console.WriteLine("Result: " + result.ToString()); if ((double)result != (double)447.5) { Console.WriteLine("FAILED"); Environment.Exit(1); } Console.WriteLine("PASSED"); }
static void Main(string[] args) { Valuesa v; v.a = 12; v.b = 23; v.c = 34; v.d = 45; v.e = 56; v.f = 67; v.g = 78; v.h = 89; ComplexDelegate d = new ComplexDelegate(Worker); d += new ComplexDelegate(Worker); d += new ComplexDelegate(Worker); float result = d( (float)1.5, 2.5, v, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 14.5, 15.5, 16.5, 17.5, (float)18.5); Console.WriteLine("Result: " + result.ToString()); if ((double)result != (double)447.5) { Console.WriteLine("FAILED"); Environment.Exit(1); } Console.WriteLine("PASSED"); }