Click here to Skip to main content
15,885,141 members
Home / Discussions / C#
   

C#

 
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 
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 
Asnwering your comment to PIEBALDconsult and to me at teh same time: Not all databases need any installation. For example, there is SqlCE which was meant for Windows Mobile devices, but can be used by desktop machines. The code is built into .NET, so if they can run your program, it can use a database. It's pretty full SQL with only a few limitations: single user, no stored procedures, no triggers, but for 90% of simple apps it works like a charm - Outlook stores it's data in modified SqlCE databases.

You can serialize it, yes:
// Read from file
string path = @"F:\Temp\roman.txt";
List<string> myList = new List<string>();
myList.AddRange(File.ReadAllLines(path));
// Write to serialization file.
using (Stream stream = File.Open(@"F:\Temp\data.bin", FileMode.Create))
    {
    BinaryFormatter bin = new BinaryFormatter();
    bin.Serialize(stream, myList);
    }
// Read from serialization file
List<string> myList2;
using (Stream stream = File.Open(@"F:\Temp\data.bin", FileMode.Open))
    {
    BinaryFormatter bin = new BinaryFormatter();
    myList2 = (List<string>) bin.Deserialize(stream);
    }
But this will be slower than reading text! (Simple tests say about twice as slow!)
Additionally, you will need some utility or method to modify values.
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 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 
AnswerRe: Killing hidden processes Pin
dan!sh 6-Apr-11 17:29
professional dan!sh 6-Apr-11 17:29 
GeneralRe: Killing hidden processes Pin
teknolog1237-Apr-11 4:02
teknolog1237-Apr-11 4:02 
GeneralRe: Killing hidden processes Pin
dan!sh 7-Apr-11 5:41
professional dan!sh 7-Apr-11 5:41 
AnswerRe: Killing hidden processes Pin
Rajesh R Subramanian7-Apr-11 6:49
professionalRajesh R Subramanian7-Apr-11 6:49 

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.