[]
Base class for collection element classes.
public class IndexableObject : INotifyPropertyChanged
Using IndexedCollection<T> and other collection classes|tag=LiveLinq to Objects: IndexedCollection(T) and other collection classes in LiveLinq to Objects, the element class T must implement the property change notification interface INotifyPropertyChanged. The easiest way to satisfy this requirement is to derive that class from IndexableObject. Then you can use its method OnPropertyChanged(string) to send the required property change notifications. For example, a Customer class can be defined like this:
public class Customer : IndexableObject
{
.....................
private string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
OnPropertyChanged("Name");
}
}
.....................
}
Name | Description |
---|---|
IndexableObject() | Initializes a new instance of the IndexableObject class. |
Name | Description |
---|---|
OnPropertyChanged(string) | Raises the PropertyChanged event. |
Name | Description |
---|---|
PropertyChanged | Occurs when a property value changes, after it has been changed. |