Delegate-to-form application learning

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.