Method name expected
When creating a delegate, specify a method.
The following sample generates CS0149:
using System; delegate string func(int i); class a { static func dt; // class member-field of the declared delegate type public static void Main() { dt = new func(17.45); // CS0149 // try the following line instead // dt = new func(func2); x(dt); } public static string func2(int j) { Console.WriteLine(j); return j.ToString(); } public static void x(func myFunc) { myFunc(8); } }