/* public void FancyMethod(Student st) * { * st.PrintMe(); * } * public void FancyMethod(Instructor instructor) * { * instructor.PrintMe(); * }*/ public static void MyFancyMethod(ISayHello myObj) // static for main to access it. { myObj.PrintMe(); }
//public void FancyMethod(Student st) //{ // st.PrintMe(); //} //public void FancyMethod(Instructor st) //{ // st.PrintMe(); //} public static void MyFancyMethod(ISayHello myObj) { myObj.PrintMe(); }