Refresher/SDLC/Delegate and Polomorphism

Presentation

Delegate and Polomorphism    
 
 Polymorphism or Delegate: method overloading or method passing
 
 
 Late binding: method looked up by name at run-time and exact behavior determined at run-time
 
 
 Early binding: method name and signature stored in the virtual method table (v-table) at compile time
 
 
 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
 
 
 multicast delegate: a delegate that points to and eventually fires off several methods
 
 
 Delegate: a class -- usable if declared and instantiated
 
 
 Delegate use: passed around as a parameter, and invoked by the receiving object
 
 
 Delegate example 1: success = MyAddressProvider.HandleCampaign(WhatToDoWithAddresses)
 
 
 Delegate example 2: MyMenuItem.Click += new System.Windows.RoutedEventHandlerMyMenuItem_Click)