コード例 #1
0
ファイル: Compute.cs プロジェクト: JnS-Software-LLC/CSC153
 /* Tests with Sqrt and Square */
 public static void Main()
 {
     Compute test = new Compute();
     ComputeDelegate compute = new ComputeDelegate(Math.Sqrt);
     Console.WriteLine(test.Test(5, compute));
     compute = new ComputeDelegate(test.Square);
     Console.WriteLine(test.Test(5, compute));
     Console.WriteLine(test.Test(5, (double x) => x*x*x));
 }