//main method public static void Main() { G obj; obj = new G1(); obj.gfg1(); obj = new G2(); obj.gfg1(); }
//main method public static void Main() { G obj; obj = new G1(); obj.gfg1(); obj.speak(); obj = new G2(); obj.gfg1(); Console.ReadLine(); }