c#中怎样声明函数数组

class AppMain
{
   static double add(double a,double b){return a+b;}
   static double sub(double a,double b){return a-b;}
   static double mul(double a,double b){return a*b;}
   static double div(double a,double b){return a/b;}
   delegate double FUNC(double a, double b);

   static void Main()
   {
      FUNC[] f = {
      new FUNC(add),
      new FUNC(sub),
      new FUNC(mul),
      new FUNC(div)
      };
      Console.WriteLine("{0}", f[0](10, 10));
   }

}


http://bbs.csdn.net/topics/40205276

你可能感兴趣的:(c#中怎样声明函数数组)