Click here to Skip to main content
15,886,258 members
Home / Discussions / C#
   

C#

 
GeneralRe: Regular Expresssion Pin
#realJSOP7-Apr-11 7:30
mve#realJSOP7-Apr-11 7:30 
GeneralRe: Regular Expresssion Pin
Pete O'Hanlon7-Apr-11 7:31
mvePete O'Hanlon7-Apr-11 7:31 
GeneralRe: Regular Expresssion Pin
AspDotNetDev7-Apr-11 7:56
protectorAspDotNetDev7-Apr-11 7:56 
GeneralRe: Regular Expresssion Pin
Pete O'Hanlon7-Apr-11 8:31
mvePete O'Hanlon7-Apr-11 8:31 
GeneralRe: Regular Expresssion Pin
PIEBALDconsult7-Apr-11 14:30
mvePIEBALDconsult7-Apr-11 14:30 
GeneralRe: Regular Expresssion Pin
GenJerDan7-Apr-11 3:38
GenJerDan7-Apr-11 3:38 
QuestionAppropriate solution on reading a list of Strings from a file Pin
nstk6-Apr-11 21:35
nstk6-Apr-11 21:35 
AnswerRe: Appropriate solution on reading a list of Strings from a file Pin
OriginalGriff6-Apr-11 22:30
mveOriginalGriff6-Apr-11 22:30 
I would go with strings in a file, then just
List<string> myList = new List<string>();
myList.AddRange(File.ReadAllLines(path));
The memory space shouldn't be a problem, even with thousands of strings, and it won't take long to load anyway. You could hold them as XML data, but then it is a bit harder to edit: you can cause errors in the file. At least with straight text, you don't need any special tools (or intelligence) to change them, so that job can be hived off to the office idiot junior.

A quick test said mine read 5000 lines in 7mSec (on the first try, so caching was not involved) - and my PC is nowhere near SOTA!

Always go with an option that means you don't have to re-compile!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

Manfred R. Bihy: "Looks as if OP is learning resistant."

GeneralRe: Appropriate solution on reading a list of Strings from a file Pin
nstk7-Apr-11 4:34
nstk7-Apr-11 4:34 
AnswerRe: Appropriate solution on reading a list of Strings from a file Pin
PIEBALDconsult7-Apr-11 3:07
mvePIEBALDconsult7-Apr-11 3:07 
GeneralRe: Appropriate solution on reading a list of Strings from a file [modified] Pin
nstk7-Apr-11 4:37
nstk7-Apr-11 4:37 
AnswerRe: Appropriate solution on reading a list of Strings from a file Pin
OriginalGriff7-Apr-11 8:54
mveOriginalGriff7-Apr-11 8:54 
GeneralRe: Appropriate solution on reading a list of Strings from a file Pin
nstk7-Apr-11 10:48
nstk7-Apr-11 10:48 
GeneralRe: Appropriate solution on reading a list of Strings from a file Pin
PIEBALDconsult7-Apr-11 15:26
mvePIEBALDconsult7-Apr-11 15:26 
QuestionKilling hidden processes Pin
teknolog1236-Apr-11 9:43
teknolog1236-Apr-11 9:43 
AnswerRe: Killing hidden processes Pin
Luc Pattyn6-Apr-11 13:51
sitebuilderLuc Pattyn6-Apr-11 13:51 
GeneralRe: Killing hidden processes Pin
Rajesh R Subramanian7-Apr-11 6:52
professionalRajesh R Subramanian7-Apr-11 6:52 
GeneralRe: Killing hidden processes Pin
Luc Pattyn7-Apr-11 6:59
sitebuilderLuc Pattyn7-Apr-11 6:59 
GeneralRe: Killing hidden processes Pin
Pete O'Hanlon7-Apr-11 9:30
mvePete O'Hanlon7-Apr-11 9:30 
GeneralRe: Killing hidden processes Pin
Luc Pattyn7-Apr-11 10:04
sitebuilderLuc Pattyn7-Apr-11 10:04 
GeneralRe: Killing hidden processes Pin
Pete O'Hanlon7-Apr-11 10:09
mvePete O'Hanlon7-Apr-11 10:09 
GeneralRe: Killing hidden processes Pin
Luc Pattyn7-Apr-11 10:52
sitebuilderLuc Pattyn7-Apr-11 10:52 
AnswerRe: Killing hidden processes Pin
Bassam Abdul-Baki6-Apr-11 14:09
professionalBassam Abdul-Baki6-Apr-11 14:09 
GeneralRe: Killing hidden processes Pin
thatraja6-Apr-11 17:56
professionalthatraja6-Apr-11 17:56 
AnswerRe: Killing hidden processes Pin
Dave Kreskowiak6-Apr-11 14:38
mveDave Kreskowiak6-Apr-11 14:38 

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.