?? 實現多個接口.txt
字號:
public interface IWindow
{
Object GetMenu();
}
pubic interface IRestaurant
{
Object GetMenu();
}
public class Giu:IWindow,IRestaurant
{
Object IWindow.GetMenu(){}//添加接口名稱限定
Object IRestaurant.GetMenu(){}
public Object GetMenu(){}//內部定義
}
原則:先安全限定接口成員,后非完全限定接口成員。
實現中類型很少實現多個定義相同方法的接口。
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -