Commissioned:
A container of functions that can hold functions of the same parameter type.
Definition: public delegate void Mydele (int a,int b);
And class, placed outside the class.
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 ();
Addition operations between 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
Inherit from 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:
Delegate-to-form application learning