static void Main(string[] args) { MSExcel excel = new MSExcel(); excel.New(); excel.Close(); //----------------------------------- IMsProduct msExcel = new MSExcel(); msExcel.New(); //Type Casting }
static void Main(string[] args) { //Interface MSOffice MSOffice office = new MSExcel(); //Interface MSProduct MSProduct product = new MSExcel(); MSExcel excel = new MSExcel(); excel.Print(); office.NewFile(); excel.NavigationBar(); MSProduct msProduct = (MSProduct)office; msProduct.NavigationBar(); ((MSProduct)office).NavigationBar(); product.NavigationBar(); }