Review Questions



What are the similarities and differences between delegates and abstract methods?


Why is delegate a good name for the delegate construct?


Where in a program can a delegate definition be positioned?


Consider the following delegate definition:

 public delegate int Filtering(string str); 

Which of the following methods can instances of this delegate encapsulate?

  1. protected int Filtering(string myString, double x) {...}

  2. internal static int FilteringOp(string myStr) {...}

  3. public double Filtering(string str) {...}

  4. public short Sum(int x, int y) {...}


Why must multicast delegates have the return type void?

  1. Which arithmetic operators can be used with multicast delegates?

  2. Which arithmetic operators can be used with events when called from outside the object where they reside?


What is an event handler?


C# Primer Plus
C Primer Plus (5th Edition)
ISBN: 0672326965
EAN: 2147483647
Year: 2000
Pages: 286
Authors: Stephen Prata

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: