有沒有辦法讓接口返回空和類? 接口 public interface IAnimalSlide<C> where <C>:ImageViewer
{
void endShow();
imageViewer displayImage();
void setNewImage();
}
CatSlide public class Cat: IAnimalShow
我有一個叫Employee的類,現在我想寫一個叫ReusaxCorp的類。該公司的每個員工都有一個ID,一個名字和一個工資總額,以後可以檢索。 ReusaxCorp類應註冊並刪除員工(從沒有員工開始)。我的問題是,我不知道我可以如何註冊員工並存儲他們。此外,我被告知使用多態性。下面是Employee類: public class Employee {
private String ID
我在單頁應用程序中有一個應用程序。 我也註冊和登錄外面。 我想知道我是否應該用於登錄,註冊和密碼恢復使用方法:用類 1,標準單例模式。 export class Register {
foo(): any {}
}
2.or也許在Register.ts等中只有「export foo」。 export function foo: any {}
3.or一切都保存在模塊註冊,模塊登