2013-11-14 199 views

回答

4

你要找的組成,而不是繼承:

public class Employee 
{ 
    public List<Leave> Leaves { get; set; } 
} 
+0

感謝您的幫助,它沒有給我完整的解決方案,但給我一個使用集合的技巧。 – Vinod

0

,如果你投上您鍵入的喜歡,你可以:

Employee emp = new EmployeeDerived(); 
真正

這將是明顯的還是葉型。