are delegates and proxies in C # a concept??

Source: Internet
Author: User
Just looked at the information, found that some information is said to be agents, some say is commissioned, but all refers to the same thing delegate, entrusted and event is related, because the nature of the event is multicast commissioned, on the multicast commissioned landlord can find information to know.
But personally, the two concepts are similar but not equal. From the actual situation to understand, Proxy is actually a design pattern, for example: some do not want to be accessed by the outside world or prohibit directly outside the object, at this time need to have an intermediary to enable it to communicate with the outside world, and the kind of intermediary is called acting. The delegate (Delegate) in C # is somewhat different, and its essence is a function pointer, which simply provides the method to which the object is delegated to other object calls, and does not make any modifications. The proxy is not provided by the original interface, it is to define itself as a proxy object the same or similar interface to provide external calls, because the method provided is entirely determined by the nature of the agent itself.
So personally, delegate in C # is called a delegate more appropriate.

are delegates and proxies in C # a concept??

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.