Class Library Delegate

Source: Internet
Author: User

1. C # source code files, including in their own projects


2, class library, suffix name is. dll

Advantages: You write a method that others do not see the implementation process, strong confidentiality

Cons: If you write a method with errors, others cannot change


Commissioned:
Pointers that can be understood as functions

Delegate-Defining keywords

declaring delegate types
public delegate int Firstdel (int aaa, int bbb);

Create delegate variable, assign value, function point to
Firstdel f1 = new Jiajian (). Jia;


int c = F1 (10, 20);

var: universal type

Object: base class for all types

As: type conversion, if the conversion is unsuccessful, does not error, but returns a null

is: Determines whether a variable/object is a certain type, returns a bool value

Generic collection: List<t>

A set of fixed-length, invariant types

List<jiajian>list=new list<jiajian> ();

Class Library Delegate

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.