delegate double Function(double x);
class Test
{
static double[] Apply(double[] a, Function f) { ... }
static void F(double[] a, double[] b)
{
a = Apply(a, delegate(double x) { return Math.Sin(x); });
b = Apply(b, delegate(double y) { return Math.Sin(y); });
// 編譯器可使兩個委托指向同一方法
}
}