[training]ASP.NET MVC 5 - C # basic grammar 3

Interface: 定義為抽象的概念,與Class差別為,界面雖然有包含屬性與方法,但只宣告而不包含實作內容。
--類別只能"繼承"一個父類別,但能"實作"(語法跟繼承很像)多個介面。(老爸只能有一個,乾爹可以認很多個的概念)
--類別實作介面時,只會得到方法的名稱,不會包含任何實作內容。

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.