Click here to Skip to main content
15,924,038 members
Home / Discussions / C#
   

C#

 
QuestionCould not use ''; file already in use Pin
dec8216-Nov-08 16:00
dec8216-Nov-08 16:00 
AnswerRe: Could not use ''; file already in use Pin
N a v a n e e t h16-Nov-08 16:23
N a v a n e e t h16-Nov-08 16:23 
AnswerRe: Could not use ''; file already in use Pin
Paul Conrad16-Nov-08 17:45
professionalPaul Conrad16-Nov-08 17:45 
Questionxsl ? Pin
dec8216-Nov-08 15:56
dec8216-Nov-08 15:56 
AnswerRe: xsl ? Pin
Brij16-Nov-08 17:40
mentorBrij16-Nov-08 17:40 
GeneralRe: xsl ? Pin
dec8216-Nov-08 18:09
dec8216-Nov-08 18:09 
AnswerRe: xsl ? Pin
Guffa16-Nov-08 18:15
Guffa16-Nov-08 18:15 
GeneralRe: xsl ? Pin
dec8216-Nov-08 18:28
dec8216-Nov-08 18:28 
GeneralRe: xsl ? Pin
Guffa16-Nov-08 21:18
Guffa16-Nov-08 21:18 
Questioncan someone help me... Pin
cutedrew16-Nov-08 14:06
cutedrew16-Nov-08 14:06 
AnswerRe: can someone help me... Pin
Mycroft Holmes16-Nov-08 15:12
professionalMycroft Holmes16-Nov-08 15:12 
QuestionRe: can someone help me... Pin
nelsonpaixao17-Nov-08 13:32
nelsonpaixao17-Nov-08 13:32 
QuestionData Structure Pin
duta16-Nov-08 7:23
duta16-Nov-08 7:23 
AnswerRe: Data Structure Pin
sph3rex16-Nov-08 8:31
sph3rex16-Nov-08 8:31 
AnswerRe: Data Structure Pin
User 665816-Nov-08 8:44
User 665816-Nov-08 8:44 
AnswerRe: Data Structure Pin
Mark Churchill16-Nov-08 12:49
Mark Churchill16-Nov-08 12:49 
Probably the quick/simple in-memory data structure would be a Dictionary< string, List< int>>. Dictionarys are a hashtable, so lookups are log-n. I'm assuming from your example that there is a small number of ints.

As for parsing the file, I'd ignore the other suggestions to use regexs if the file is large. Its said that when a man is faced with a problem and decides to solve it with a regex, then he now has two problems Wink | ;) Just string.Split on the space - it'll be orders of magnitude faster than the regex.


GeneralRe: Data Structure Pin
Alan Balkany17-Nov-08 4:03
Alan Balkany17-Nov-08 4:03 
GeneralRe: Data Structure Pin
Mark Churchill17-Nov-08 11:42
Mark Churchill17-Nov-08 11:42 
AnswerRe: Data Structure Pin
Guffa16-Nov-08 13:05
Guffa16-Nov-08 13:05 
AnswerRe: Data Structure Pin
Mycroft Holmes16-Nov-08 15:15
professionalMycroft Holmes16-Nov-08 15:15 
QuestionCasting Error Pin
Vimalsoft(Pty) Ltd16-Nov-08 4:02
professionalVimalsoft(Pty) Ltd16-Nov-08 4:02 
AnswerRe: Casting Error Pin
Wendelius16-Nov-08 4:38
mentorWendelius16-Nov-08 4:38 
GeneralRe: Casting Error Pin
Guffa16-Nov-08 6:58
Guffa16-Nov-08 6:58 
GeneralRe: Casting Error Pin
Wendelius16-Nov-08 9:44
mentorWendelius16-Nov-08 9:44 
AnswerRe: Casting Error Pin
Guffa16-Nov-08 7:01
Guffa16-Nov-08 7:01 

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.