暑假到了 小弟想說 學學看c#
自學到抽象(abstract)網路找資源學
可是有一個問題 一直想不出來
敢問各位大大此問題(問題太欠噓 在此sor 想知道ans)
Q:
寫了一個 抽象的 person 裡面寫了幾個函式
我再讓student繼承
之後我在student裡面多寫了一個函式
叫studentID好了(person裡面沒有寫喔)
最後我在主函式
person ps1 = new student("A123456789"); //建構子建造studentID必須的字串
但是ps1.沒顯示出可選擇studentID
我知道在上面那種宣告方法 指向的位址 只有person的函式
可是有方法能讓ps1.studentID()能使用嗎??
除了 student s1 = new student("A123456789");
謝謝各位大大的回答!!