Click here to Skip to main content
15,881,588 members
Home / Discussions / C#
   

C#

 
GeneralRe: Insert Data in to DB Table after verification Pin
pmarfleet19-Nov-07 12:13
pmarfleet19-Nov-07 12:13 
GeneralRe: Insert Data in to DB Table after verification Pin
Skanless20-Nov-07 6:17
Skanless20-Nov-07 6:17 
Questionproblems with FileSystemWatcher Pin
stephan_00719-Nov-07 6:49
stephan_00719-Nov-07 6:49 
AnswerRe: problems with FileSystemWatcher Pin
Giorgi Dalakishvili19-Nov-07 7:50
mentorGiorgi Dalakishvili19-Nov-07 7:50 
GeneralRe: problems with FileSystemWatcher Pin
stephan_00719-Nov-07 10:49
stephan_00719-Nov-07 10:49 
GeneralRe: problems with FileSystemWatcher Pin
stephan_00719-Nov-07 22:06
stephan_00719-Nov-07 22:06 
AnswerRe: problems with FileSystemWatcher Pin
KKrista20-Nov-07 1:40
KKrista20-Nov-07 1:40 
QuestionFile Manipulation Pin
LCI19-Nov-07 6:40
LCI19-Nov-07 6:40 
Not sure why i don't seem to get this but i would like to write some records to a .txt file. At the end of all records, would like to keep a number which signifies the count. So if there are 5 records, the last line in the file will have "5".

If i have to add 10 more. I read the last line, add 10 to the number to total 15. etc.
I have been using StreamReader and Writer to do this, but i find that there is a limitation

I really want to be able to:
Open the file
Check the last line to see a number count
Append more data to file, update the number count.
Close the file.

if (!FileExists(ReportFile))
{
File.Create(ReportFile);
}
StreamReader stream = new StreamReader(ReportFile);
//How would i get to the end of the file and only read a line that says:
Count:100
where the statement "Count:" is constant, but the number will vary as we add
records?

Then i write the records:
StreamWriter filewrite = new StreamWriter(ReportFile, true);
filewrite.WriteLine(Rec);
filewrite.Close;





File
AnswerRe: File Manipulation Pin
pmarfleet19-Nov-07 8:39
pmarfleet19-Nov-07 8:39 
GeneralRe: File Manipulation Pin
LCI19-Nov-07 16:43
LCI19-Nov-07 16:43 
Questionlogin page problem Pin
rocky81119-Nov-07 6:22
rocky81119-Nov-07 6:22 
AnswerRe: login page problem Pin
Anthony Mushrow19-Nov-07 6:33
professionalAnthony Mushrow19-Nov-07 6:33 
GeneralRe: login page problem Pin
rocky81119-Nov-07 6:34
rocky81119-Nov-07 6:34 
QuestionGeneral Questions using Attach Process [modified] Pin
Khoramdin19-Nov-07 6:18
Khoramdin19-Nov-07 6:18 
QuestionSome issue with thread synchronization & events Pin
Karma Komae19-Nov-07 5:44
Karma Komae19-Nov-07 5:44 
AnswerRe: Some issue with thread synchronization & events Pin
Judah Gabriel Himango19-Nov-07 9:31
sponsorJudah Gabriel Himango19-Nov-07 9:31 
GeneralRe: Some issue with thread synchronization & events Pin
Karma Komae19-Nov-07 21:56
Karma Komae19-Nov-07 21:56 
QuestionDataBound DataGridView Relational DB Problem Pin
shirazamod19-Nov-07 5:03
shirazamod19-Nov-07 5:03 
AnswerRe: DataBound DataGridView Relational DB Problem Pin
pmarfleet19-Nov-07 9:04
pmarfleet19-Nov-07 9:04 
GeneralRe: DataBound DataGridView Relational DB Problem Pin
shirazamod19-Nov-07 9:45
shirazamod19-Nov-07 9:45 
GeneralRe: DataBound DataGridView Relational DB Problem Pin
pmarfleet19-Nov-07 9:50
pmarfleet19-Nov-07 9:50 
QuestionEnumerators and locks. Pin
jmhamm19-Nov-07 4:40
jmhamm19-Nov-07 4:40 
AnswerRe: Enumerators and locks. Pin
Bekjong19-Nov-07 5:00
Bekjong19-Nov-07 5:00 
GeneralRe: Enumerators and locks. Pin
jmhamm19-Nov-07 5:08
jmhamm19-Nov-07 5:08 
AnswerRe: Enumerators and locks. Pin
Daniel Grunwald19-Nov-07 11:42
Daniel Grunwald19-Nov-07 11:42 

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.