O'Reilly logo

C# Primer Plus by Klaus Michelsen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Review Questions

1:What are the similarities and differences between delegates and abstract methods?
2:Why is delegate a good name for the delegate construct?
3:Where in a program can a delegate definition be positioned?
4: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) {...}

5:Why must multicast delegates have the return type void?
6:
  1. Which arithmetic operators can be used with multicast delegates?

  2. Which arithmetic operators can be used with events when called ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required