Project Description
The ObservableDictionary class is a Dictionary object with observable events such as KeyAdded, KeyModified, KeyRemoved, etc for .NET 2.0 and up. The class was developed with C# 2.0.

Usage
ObservableDictionary<string, string> dict = new ObservableDictionary<string, string>();
dict.KeyAdded += dict_KeyAdded;
dict.KeyModified += dict_KeyModified;
dict.KeyRemoved += dict_KeyRemoved;
dict.KeyRetrieved += dict_KeyRetrieved;
dict.ListCleared += dict_ListCleared;

dict.Add("hello", "world");
dict&#91;"hello"] = "world2";
dict.Remove("hello");
dict&#91;"white"] = "#ffffff";
dict.Clear();

private void dict_KeyAdded(object sender, KeyAddedEventArgs<string, string> e)
{
//Code goes here
}

private void dict_KeyModified(object sender, KeyModifiedEventArgs<string, string> e)
{
//Code goes here
}

private void dict_KeyRemoved(object sender, KeyEventArgs<string> e)
{
//Code goes here
}

private void dict_KeyRetrieved(object sender, KeyEventArgs<string> e)
{
//Code goes here
}

private void dict_ListCleared(object sender, EventArgs e)
{
//Code goes here
}

Last edited Dec 3, 2008 at 7:02 PM by jstawski, version 5