Delegate
What is delegation?
If I understand it personally, delegation is equivalent to a pointer in C language, and it can also be understood as a class. Baidu's definition is
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Weituo_ShiJian { //define a delegate public delegate void AppearanceDelegate(string Appearance); class program { //define a method private static void Method(string Appearance) { Console.WriteLine("Your appearance is very: " + Appearance); } static void Main(string [] args) { //Instantiate the delegate and initialize AppearanceDelegate appDelegate = new AppearanceDelegate(Method); Method("Handsome!"); Console.ReadKey(); } } }