Reputation: 1123
I have a need to use the INotifyPropertyChanged interface on a class. This is needed to update values in a form when the underlying property changes.
This class already derives from another class which doesn't implement the INotifyPropertyChanged interface.
this doesn't work:
public class MyClass : BaseClass : INotifyPropertyChanged { }
I'd appreciate ideas on program structure changes or syntax changes that will let me accomplish the objective of updating the form when a property in the base class is changed.
Upvotes: 0
Views: 106
Reputation: 937
public class MyClass : BaseClass, INotifyPropertyChanged {}
You will also need to provide an implementation for INotifyPropertyChanged
.
Upvotes: 1
Reputation: 14757
Don't you just want to do this:
public class MyClass : BaseClass , INotifyPropertyChanged { }
(note the comma instead of the colon) Hope that helps,
John
Upvotes: 2
Reputation: 7621
public class MyClass : BaseClass : INotifyPropertyChanged {}
Should be:
public class MyClass : BaseClass, INotifyPropertyChanged {}
Upvotes: 1
Reputation: 77546
public class MyClass : BaseClass, INotifyPropertyChanged { }
(Add a comma after the base class)
Upvotes: 6