static void Main(string[] args) //We haven't told to the Client program that we are creating the object of Teacher Class or Student Class { Console.WriteLine("Enter Your Object Type"); string type = Console.ReadLine(); //The value entered by user should get store under type variable I1 obj = CreateObj.getObject(type); //I1 will get refernce of which class to call Console.WriteLine(obj.getfname()); //Creating Object through common interface Console.ReadLine(); }