C # Wiele dziedziczenia

Obecnie studiuję C # z ASP.NET MVC 4 za pomocąKoduj pierwsze podejście. Im Visual Basic Developer, a teraz chcę uruchomić C #. I teraz przeszedłem przez sytuację, w której muszę zarządzać wieloma dziedziczeniami. Ale nie jest to możliwe w klasie i pomyślałem. Jak więc zarządzać tymi klasami:

//I have the Following Person Class which Hold Common Properties 
//and a Type of Person e.g : Student, Faculty, Administrative
public class Person
{
    public int Id { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Type { get; set; }
}


//This is my Student Class, which is Derived from Person
public class Student:Person
{
    public DateTime DateOfBirth { get; set; }
    public DateTime EnrollmentDate { get; set; }
    public string Remarks { get; set; }


    public bool Approved { get; set; }
    public DateTime ApprovedDate { get; set; }
    public int ApprovedUserId { get; set; }
}


//This is my Faculty Class, which is also Derived from Person
public class Faculty : Person
{
    public DateTime HiredDate { get; set; }


    public bool Approved { get; set; }
    public DateTime ApprovedDate { get; set; }
    public int ApprovedUserId { get; set; }
}

To, co chcę zrobić, to Zatwierdzone, ApprovedDate i ApprovedUserId również wspólne. Chcę określić te właściwości, takie jak:

 public class Approve {
    public bool Approved { get; set; }
    public DateTime ApprovedDate { get; set; }
    public int ApprovedUserId { get; set; }
}

I chcesz użyć:

public class Student:Person,Approve
{
    public DateTime DateOfBirth { get; set; }
    public DateTime EnrollmentDate { get; set; }
    public string Remarks { get; set; }
}

I nie mogę włożyć tych rzeczy do środkaOSOBA. Ponieważ muszę użyć tego do innych klas, ale nie są to Osoby.

Następnie, jak to osiągnąć ...

Podaj mi przykład powyższej sytuacji.

Proszę pomóż. I dziękuję bardzo z góry.

questionAnswers(6)

yourAnswerToTheQuestion