|
-
March 24th, 2008, 12:40 PM
#3
Re: Reading a specific line from txt file
If you want really fast access, without doing IO operation all the time (like you do in your solution), I would suggest that you parse only your file once and put it in a dictionary or a similar structure optimized for search. Since you probably doesn't have a lot of data, it can probably stay in memory with no problems.
Nelo suggested to use XML. I think it's a nice idea. Not for searching, but it's more robust than just using 'tabs' and 'return' in a text file and can be automatically parsed into your C# structure without doing any code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|