看板 C_Sharp 關於我們 聯絡資訊
今天看到這樣的一句話 A derived class can inherit a static member. But a static member in C# can't be marked as override, virtual or abstract. However it is possible to hide a base class static method in a derived class by using the keyword new. 想請問 宣告為static的同時 是有什麼考慮 要規定不可以同時為 override, virtual or abstract?? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.229.69.209
xcycl:virtual 是為了在 runtime 做 late-binding 動態決定呼叫 09/24 01:20
xcycl:想想看, 所以你宣告成 static 會是什麼情況'? 09/24 01:20