Refresher/m/SDLC/Delegate and Polymorphism

Abstract and Interface
Gohome.png
Delegate and Polymorphism
Construction - Part 4
   
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 = My Address Provider.Handle Campaign(What To Do With Addresses)
Ledgray.png
 Delegate example 2: MyMenuItem.Click += new System.Windows.Routed Event Handler (MyMenuItem_Click)