-
-
-
-
-
-
[C#] is 타입 검사C#/기초 2026. 7. 9. 10:17
private void SubscribeToPropertyChanged(IComponent component) { if (component is System.ComponentModel.INotifyPropertyChanged notifyPropertyChanged) { notifyPropertyChanged.PropertyChanged += OnComponentPropertyChanged; } }이 코드에서 IComponent 는 INotifyPropertyChanged 를 이용하지 않지만 component 의 실체는 IComponent를 상속하는 ComponentBase 라는 class에서 INotifyPropertyChanged 를 ..
-