Friday, March 9, 2012

Dictionary or Observable Collection

I got used to use the Dictionary(of key, value) type for all objects that of list type but has some unique values like in roll numbers or IDs etc.

Later, I changed from default form apps to wpf apps, now the functionality of dictionary is same but with System.Collections.ObjectModel.ObservableCollection(of type) is very helpful due to WPF binding feature and mainly due to the INotify character of this type.

But Dictionary is lot more convenient to code in background, but, I am forced to use list, the only reason to change from Dictionary to Observable Collection is to reduce the amount of time on code for handing the GUI sync (two way binding)

No comments:

Post a Comment