Refresher/SDLC/Delegate and Polomorphism

From Wikiversity
Jump to navigation Jump to search

Presentation

Abstract and Interface
Gohome.png
Delegate and Polomorphism
Construction - Part 4
List of Topics
   
This presentation was made possible by Wikiversal/WikiverSuite, which is made possible by your donation. Thank you for your support.
Construction - Part 4
Ledgray.png
 Polymorphism or Delegate: method overloading or method passing
 
Ledgray.png
 Late binding: method looked up by name at run-time and exact behavior determined at run-time
 
Ledgray.png
 Early binding: method name and signature stored in the virtual method table (v-table) at compile time
 
Ledgray.png
 Polymorphism: objects from different types responding to calls by the same name, e.g. operator overloading for addition delegate (function pointers in C++): an object encapsulates reference to a method
 
Ledgray.png
 multicast delegate: a delegate that points to and eventually fires off several methods
 
Ledgray.png
 Delegate: a class -- usable if declared and instantiated
 
Ledgray.png
 Delegate use: passed around as a parameter, and invoked by the receiving object
 
Ledgray.png
 Delegate example 1: success = MyAddressProvider.HandleCampaign(WhatToDoWithAddresses)
 
Ledgray.png
 Delegate example 2: MyMenuItem.Click += new System.Windows.RoutedEventHandlerMyMenuItem_Click)
 
Mobile version