Click here to Skip to main content
16,005,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: VS 2005's application/client settings Pin
Heath Stewart7-Jan-05 6:31
protectorHeath Stewart7-Jan-05 6:31 
GeneralRe: VS 2005's application/client settings Pin
Marlun7-Jan-05 7:49
Marlun7-Jan-05 7:49 
GeneralRe: VS 2005's application/client settings Pin
Heath Stewart10-Jan-05 6:04
protectorHeath Stewart10-Jan-05 6:04 
GeneralRe: VS 2005's application/client settings Pin
Marlun10-Jan-05 7:31
Marlun10-Jan-05 7:31 
GeneralRe: Insert a line into the begining of the text file Pin
Anonymous7-Jan-05 1:33
Anonymous7-Jan-05 1:33 
GeneralRe: Insert a line into the begining of the text file Pin
Stefan Troschuetz7-Jan-05 1:45
Stefan Troschuetz7-Jan-05 1:45 
GeneralRe: Insert a line into the begining of the text file Pin
itssuk9-Jan-05 18:26
itssuk9-Jan-05 18:26 
GeneralRe: Insert a line into the begining of the text file Pin
Stefan Troschuetz9-Jan-05 21:41
Stefan Troschuetz9-Jan-05 21:41 
I took a deeper look into the documentation and think you'll have to use one of the other suggested solutions.
The File.AppendText(path) method is equivalent to StreamWriter(path, true). The boolean parameter append "determines whether data is to be appended to the file. If the file exists and append is false, the file is overwritten. If the file exists and append is true, the data is appended to the file. Otherwise, a new file is created."
So in the current solution, append is true and seeking backward is forbidden. By replacing File.AppendText(path) with StreamWriter(path, false) you should be able to seek backward, but as the above text state the existing file content will be overwritten.

Sorry and more luck with the other suggestion Smile | :)







www.troschuetz.de
GeneralRe: Insert a line into the begining of the text file Pin
J4amieC7-Jan-05 2:18
J4amieC7-Jan-05 2:18 
QuestionHow to process the key events? Pin
bouli7-Jan-05 1:25
bouli7-Jan-05 1:25 
AnswerRe: How to process the key events? Pin
Nick Parker7-Jan-05 3:03
protectorNick Parker7-Jan-05 3:03 
GeneralRe: How to process the key events? Pin
bouli7-Jan-05 6:26
bouli7-Jan-05 6:26 
AnswerRe: How to process the key events? Pin
Heath Stewart7-Jan-05 6:28
protectorHeath Stewart7-Jan-05 6:28 
GeneralRe: How to process the key events? Pin
bouli7-Jan-05 6:35
bouli7-Jan-05 6:35 
Generalurgent ( about window services) Pin
Allah Kaa Bandaa7-Jan-05 0:47
Allah Kaa Bandaa7-Jan-05 0:47 
GeneralRe: urgent ( about window services) Pin
turbochimp7-Jan-05 3:05
turbochimp7-Jan-05 3:05 
GeneralRe: urgent ( about window services) Pin
Heath Stewart7-Jan-05 6:26
protectorHeath Stewart7-Jan-05 6:26 
GeneralConverting a HEX value to a DateTime Pin
Stanimir_Stoyanov7-Jan-05 0:16
Stanimir_Stoyanov7-Jan-05 0:16 
GeneralRe: Converting a HEX value to a DateTime Pin
Heath Stewart7-Jan-05 5:55
protectorHeath Stewart7-Jan-05 5:55 
QuestionHow to develop multi-language application? Pin
luozhan16-Jan-05 21:10
luozhan16-Jan-05 21:10 
AnswerRe: How to develop multi-language application? Pin
Colin Angus Mackay6-Jan-05 21:39
Colin Angus Mackay6-Jan-05 21:39 
GeneralRe: How to develop multi-language application? Pin
Heath Stewart7-Jan-05 6:21
protectorHeath Stewart7-Jan-05 6:21 
AnswerRe: How to develop multi-language application? Pin
Adam Goossens6-Jan-05 23:45
Adam Goossens6-Jan-05 23:45 
AnswerRe: How to develop multi-language application? Pin
OmegaSupreme7-Jan-05 0:05
OmegaSupreme7-Jan-05 0:05 
GeneralRe: How to develop multi-language application? Pin
Heath Stewart7-Jan-05 5:56
protectorHeath Stewart7-Jan-05 5:56 

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.