using System; using System.Collections.Generic; using System.Text; namespace Study.DelegateSeries.Core { public delegate int mydelegate(); public class Demo { public int MyDemo(int b) { return b * b; } public int UseDelegate() { mydelegate d = delegate () { return 5; }; var total = MyDemo(d()); return total; } private void aa() { } } }