Using Mark's code, I combined it with an existing QuickCode template for a strongly-typed collection derived from CollectionBase and posted it to the forum[1]. The template also generates the code to put in the collection's type-class.
So now to create a collection w/IBindingList all you need to do is (with the free QuickCode.NET add-in): collection Foo <Alt-Q> Since now it's easy to make/use a collection for databinding, I guess most of the reasons for using a dataset are eliminated. [1] http://quickcode.dvxp.com/ --Oren > -----Original Message----- > From: Moderated discussion of advanced .NET topics. [mailto:ADVANCED- > [EMAIL PROTECTED]] On Behalf Of Ian Griffiths > Sent: Monday, October 07, 2002 8:45 AM > To: [EMAIL PROTECTED] > Subject: Re: Strongly-Typed DataSets vs. Strongly-Typed Collections > > Oren Novotny wrote: > > I guess part of what I was wondering was if it would be worth > > the effort to implement IBindingList for a collection instead of > > using the implementation provided with a dataset. I always > > thought that a dataset seemed overkill for just binding a bunch > > of objects to a listbox, but then I found it useless if I wanted to > > add/remove items from the listbox. > > IBindingList isn't trivial to implement, but it's also not all that hard. > (There's just quite a lot of it...) Mark Boulter posted an implementation > here: > > http://discuss.develop.com/archives/wa.exe?A2=ind0208A&L=DOTNET- > CLR&P=R15129 > &I=-3 > > But I would hesistate to describe doing this as being simpler than using a > dataset. (A collection that implements IBindingList like this is > undoubtedly a simpler thing than a DataSet, but DataSet has the advantage > of > already being in the framework, which makes *using* it simpler... You > don't > have to write it first!) > > > -- > Ian Griffiths > DevelopMentor > > You can read messages from the Advanced DOTNET archive, unsubscribe from > Advanced DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.