public static void CoverianceDelegateExample() { var ra = new RectangleArea(); var ta = new TriangleArea(); var covDlg = new CoverianceDelegate(ra.GetRectArea); covDlg(); covDlg = new CoverianceDelegate(ta.GetTrgArea); covDlg(); }
public static void PassingRectArea(RectangleArea obj) { Console.WriteLine("RectangleArea object is passed to this method."); }