andrewducker: (Default)
[personal profile] andrewducker
There were no generics in the first version. And all of the Windows Forms code was written then, and hasn't been updated to use generics.

So (for instance), despite all of the items in Listview.Items being of type ListviewItem they're returned as Object, because it implements IEnumerable, rather than IEnumerable.

So if I want to get a list of items from the listview I have to iterate around them all, casting them to the correct type rather than just using an AddRange. Admittedly, on an individual level this isn't much of a hardship, but it's still frustrating when you add up all of the times I have to do something like that.

I know that going back and updating all of the Windows Forms code to be generic compliant would be extra effort, but it seems like one of those things that would be worth it...

Date: 2010-10-08 06:19 pm (UTC)
From: [identity profile] channelpenguin.livejournal.com
Have they updated the strongly typed dataset generator to use generics yet? That was one of my main bugbears. But yeah I used lots of conversion. Ended with my own library to make things less painful* with lists/arrays/collections etc.

*though a tiny little bit slower, of course

March 2026

S M T W T F S
1 2 3 4 56 7
8 9 10 11 12 13 14
15161718192021
22232425262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 15th, 2026 05:32 pm
Powered by Dreamwidth Studios