The C++ Programming Tutorials: The Delegates and Events
| |
|
Delegates and events are extremely powerful and important constructs in the Microsoft .NET Framework. Events in particular are used widely in GUI programs as a means of communicating between components, but both delegates and events can be used to good effect in non-GUI code. Delegates are the .NET equivalent of function pointers, and they can be created and used from any .NET language. They can be used by themselves, and they also form the basis for the .NET event mechanism discussed in the second part of this module. A delegate is a class that lets you invoke one or more methods that have a particular signature. Events provide a formalized, standard mechanism that lets event sources (such as a button) hook up with event receivers (such as a form). Events in the .NET Framework implement a publish-and-subscribe mechanism, where event sources make public the events that they will raise, they publish them and event receivers tell the source which events they’re interested in, they subscribe to events. Event receivers can also un-subscribe when they no longer want to receive a particular event. You will also find the DLL program example for C++ .NET in this tutorials. Moreover you will also learn how to set the library files and include file paths for the Windows Platform SDK in your VC++ .NET project so that compiler can find them during the compilation and liking. The following are the topics for this Chapter.
|
Best viewed using FireFox, Chrome etc. Worst viewed using IE of any version
Webmaster contact: [contact[@]visualcplusdotnet.com] Copyright 2019 © Visualcplusdotnet. All rights reserved. Excellent hosting services provided by MochaHost - The Online Central
| About | Disclaimer | Privacy | Site Index & Project Download | Native C | Contact | | |
Custom Search | |
|
|