Click here to Skip to main content
15,910,787 members
Home / Discussions / C#
   

C#

 
GeneralRe: The Immediate Window Pin
Jammer7-Mar-08 14:10
Jammer7-Mar-08 14:10 
GeneralRe: The Immediate Window Pin
Jammer7-Mar-08 14:05
Jammer7-Mar-08 14:05 
GeneralNet.Sockets - Internet to LAN Connection Exception... Pin
Trapper-Hell7-Mar-08 12:33
Trapper-Hell7-Mar-08 12:33 
GeneralRe: Net.Sockets - Internet to LAN Connection Exception... Pin
Anthony Mushrow7-Mar-08 13:04
professionalAnthony Mushrow7-Mar-08 13:04 
GeneralCustom style on a Form Pin
nike_arh7-Mar-08 12:27
nike_arh7-Mar-08 12:27 
GeneralRe: Custom style on a Form Pin
Christian Graus7-Mar-08 21:49
protectorChristian Graus7-Mar-08 21:49 
GeneralRe: Custom style on a Form Pin
nike_arh8-Mar-08 4:29
nike_arh8-Mar-08 4:29 
QuestionUsing a Dictionary, Generic List or a good old fashioned Array??? Pin
Jammer7-Mar-08 9:30
Jammer7-Mar-08 9:30 
Hi All,

I'm just looking into what's the best route and thought i'd ask here. The format of the dictionary/list/array I'm going to be using is:

Unique Key (string)
score (int) (intially all zero)

I'm then going to be comparing a string to a lookup table and based on that result i'll find the correct string in dictionary/list/array and increment the score accordingly. Once that has been completed i'll sort the dictionary (sorteddictionary?) based on the score and depending on the ascending or decending sort order grab the string from the dictionary and then reset each score (int) field ready for the next scoring process.

What's the best type to use in this scenario? In terms of size there are only around 15-20 possible unique keys so I guess performance isn't too critical but its going to be repeatedly used sometimes 400 times+ before the user will see the results ...

Cheers,

James.
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Pete O'Hanlon7-Mar-08 9:44
mvePete O'Hanlon7-Mar-08 9:44 
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Jammer7-Mar-08 10:02
Jammer7-Mar-08 10:02 
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Pete O'Hanlon7-Mar-08 10:04
mvePete O'Hanlon7-Mar-08 10:04 
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Jammer7-Mar-08 10:23
Jammer7-Mar-08 10:23 
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Luc Pattyn7-Mar-08 10:40
sitebuilderLuc Pattyn7-Mar-08 10:40 
GeneralRe: Using a Dictionary, Generic List or a good old fashioned Array??? Pin
Jammer7-Mar-08 10:42
Jammer7-Mar-08 10:42 
GeneralAnchors, MinSize, and AutoScroll Pin
eggsovereasy7-Mar-08 9:04
eggsovereasy7-Mar-08 9:04 
GeneralRe: Anchors, MinSize, and AutoScroll Pin
Luc Pattyn7-Mar-08 9:23
sitebuilderLuc Pattyn7-Mar-08 9:23 
GeneralRe: Anchors, MinSize, and AutoScroll Pin
eggsovereasy7-Mar-08 11:41
eggsovereasy7-Mar-08 11:41 
GeneralTab delimited parsing help Pin
CeleryGod7-Mar-08 8:57
CeleryGod7-Mar-08 8:57 
GeneralRe: Tab delimited parsing help Pin
snorkie7-Mar-08 9:13
professionalsnorkie7-Mar-08 9:13 
GeneralRe: Tab delimited parsing help Pin
KaptinKrunch7-Mar-08 10:57
KaptinKrunch7-Mar-08 10:57 
GeneralXML comments header Pin
Imtiaz Murtaza7-Mar-08 8:45
Imtiaz Murtaza7-Mar-08 8:45 
GeneralRe: XML comments header Pin
led mike7-Mar-08 9:22
led mike7-Mar-08 9:22 
GeneralRe: XML comments header Pin
Not Active7-Mar-08 10:04
mentorNot Active7-Mar-08 10:04 
GeneralRe: XML comments header Pin
led mike7-Mar-08 10:44
led mike7-Mar-08 10:44 
GeneralRe: XML comments header Pin
Kevin McFarlane7-Mar-08 12:15
Kevin McFarlane7-Mar-08 12:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.