Delegate: Delegate: Can be understood as a container for a function,
Which function the delegate points to represents the function
The delegate's keyword is delegate
The delegate is the same class classes, it needs to be written outside the classs. The main function differs from the normal function as the total entrance.
Delegate quite a shortcut
A container of functions that can hold functions of the same parameter type. Definition: public delegate void Mydele (int a,int b);
Usage: ① creates a variable inside the main function, Mydele Md;② a function that meets its requirements into the variable, Class1 c=new Class 1 (); Md=class1.add;③ use, MD ();
The addition operation between the delegate variables (must be of the same type); md=a+b; The subtraction operation between the delegate variables (must be of the same type); md=md-b;
Form: Also a class inherits from the form class (with various small controls) partial divides the class into two parts: the interface part, the code part.
Control actions: Drag, Ctrl + Drag right-click, properties, Text
A control is actually a class, and the process of dragging is the process of creating an object.
Menuscript:
Debug folder:
Object-Oriented delegation