By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,420 Members | 1,430 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,420 IT Pros & Developers. It's quick & easy.

Which is more efficient? Anyone know?

P: n/a
Just a query to see if anyone can tell me. Which is the quicker/best way of
a handling Type-Safe collections/Dictionaries?

1) Create a Custom Collection/Dictionary derived from
CollectionBase/DictionaryBase and implement as necessary - including
Type-Safe methods.

or - the lazier

2) Create a class, that has an internal Collection\Dictionary that is
added/removed from via implemented methods that are Type-Safe.

Anyone care to suggest?
Nov 15 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hi,

1+) Use CodeSmith to generate fast strong typed collections for you
(certainly faster then 2) ):
http://www.ericjsmith.net/codesmith/

--
Miha Markic [MVP C#] - RightHand .NET consulting & software development
miha at rthand com
www.rthand.com

"b0yce" <b0***@NOSPAMbtinternet.com> wrote in message
news:bv**********@hercules.btinternet.com...
Just a query to see if anyone can tell me. Which is the quicker/best way of a handling Type-Safe collections/Dictionaries?

1) Create a Custom Collection/Dictionary derived from
CollectionBase/DictionaryBase and implement as necessary - including
Type-Safe methods.

or - the lazier

2) Create a class, that has an internal Collection\Dictionary that is
added/removed from via implemented methods that are Type-Safe.

Anyone care to suggest?

Nov 15 '05 #2

P: n/a

"b0yce" <b0***@NOSPAMbtinternet.com> wrote in message
news:bv**********@hercules.btinternet.com...
Just a query to see if anyone can tell me. Which is the quicker/best way of a handling Type-Safe collections/Dictionaries?

1) Create a Custom Collection/Dictionary derived from
CollectionBase/DictionaryBase and implement as necessary - including
Type-Safe methods.

or - the lazier

2) Create a class, that has an internal Collection\Dictionary that is
added/removed from via implemented methods that are Type-Safe.
Well, this is basically al lthat CollectionBase and DictionaryBase does, it
provides an InnerList and InnerHashtable, respectivly, that you can write
your typesafe methods against.

If your looking for performance, you are better off getting a collection gen
util, the performance differences are significant. Anyone care to suggest?

Nov 15 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.