if(SICast is IGetData) Console.WriteLine("Implemented from IGetData,{0}",SICast.GetText()); else Console.WriteLine("SICast is not implemented from IGetData");
//as关键字的使用
IGetData DataAS = SICast as IGetData; if(DataAS !=null) Console.WriteLine("Implemented from IGetData,{0}", SICast.GetText()); else Console.WriteLine("SICast is not implemented from IGetData");