나는 INotifyPropertyChanged 이벤트로 대체해야하는 클래스 Application
이 있습니다. 원래 클래스를 재정의하는 논리를 작성하여 생성을 완료했습니다. SuperApplication
오버라이드 클래스에 C# 캐스트 클래스
라이브러리에서 데이터를 가져 오는 중이며 로딩 논리를 변경할 수 없습니다. 난 원래 클래스에서 슈퍼 클래스로 데이터를 가져 오는 방법이 필요합니다. 나는 superClass = (SuperApplication)standardClass;
과 같은 것을 시도했지만 효과가 없습니다.
어떻게해야합니까? 당신이 복사 생성자를 사용해야처럼
public class SuperCreditApplication : CreditApplication
{
public SuperCreditApplicant Applicant { get; set; }
public SuperCreditApplicant CoApplicant { get; set; }
}
public class SuperCreditApplicant : CreditApplicant
{
public SuperProspect Prospect { get; set; }
}
public class SuperProspect : Prospect, INotifyPropertyChanged
{
public State DriverLicenseState
{
get
{
return DriverLicenseState;
}
set
{
DriverLicenseState = value;
OnPropertyChanged("DriverLicenseState");
}
}
public event PropertyChangedEventHandler PropertyChanged;
private void OnPropertyChanged(string propertyName)
{
if (PropertyChanged != null)
{
PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
'Application'및 'SuperApplication'의 코드 (또는 코드 샘플)를 표시 할 수 있습니까? 감사. –
방금 추가했습니다. –