Including the kitchen sink …

Posted Tue, Sep 7 2004 22:28 by bill

Mitch asks why doesn’t List(Of T) raise events when items are added or removed.  The answer of course is because List(Of T) is the basic low level list.  It’s the engine on a minimal chassis, designed much like a formula one car.  Sure you could add things to it, but then it quickly becomes like an RV, kitchen sink and all.

Instead, if you want a “rich” collection, that is designed for UI notification when items are added or removed, then use the BindingList(Of T), and keep List(Of T) for those cases when you want just the bare minimum J

Filed under:

Comments

# re: Including the kitchen sink …

Monday, September 13, 2004 3:42 PM by bill

Where can I find the generic BindingList?

# re: Including the kitchen sink …

Monday, September 13, 2004 6:11 PM by bill

System.ComponentModel.Collections.Generic

Nice.

# Fun with Generics: BindingList and ReadOnlyCollection

Wednesday, September 15, 2004 1:16 AM by TrackBack