.NET 4 Design Question: Collection versus Dictionary

Should I use a name/value .NET Collection or a .NET name/value Dictionary for best performance? What is the best approach please? My application is ASP.NET, WCF/WF Web Application. There should be a range of 10 to 30 entries per collection. I also will need users to potentially change a couple entries at time.

I greatly appreciate your help!!
HankinCooperAsked:
Who is Participating?
 
elimesikaConnect With a Mentor Commented:
BTW

A Dictionary is one of the collections supported in .NET , the term Collection , is general , so , your questions is actually what is the best collection for name/value manipulations and the answer is Dictionary ....
0
 
elimesikaCommented:
HI
The best approach for name/value is a dictionary since each operation in a dictionary has an order of 1 complexity (that means that no matter how many items you have in the dictionary, you are paying always the same lower price , generally , one operation to search an item or to insert a new one)
0
 
HankinCooperAuthor Commented:
I have had "experts" in the past answer questions who clearly did not know what they are talking about, it is such a pleasure to have questions answered by true "experts". thank you very much!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.