Click here to Skip to main content
15,890,825 members
Home / Discussions / C#
   

C#

 
GeneralRe: Displaying data one by one using timer Pin
jacklynn_mei22-Nov-07 21:25
jacklynn_mei22-Nov-07 21:25 
GeneralRe: Displaying data one by one using timer Pin
Andrei Ungureanu22-Nov-07 21:30
Andrei Ungureanu22-Nov-07 21:30 
QuestionOpen a word file from a web Pin
arslanjatt22-Nov-07 20:03
arslanjatt22-Nov-07 20:03 
AnswerRe: Open a word file from a web Pin
Vasudevan Deepak Kumar22-Nov-07 20:08
Vasudevan Deepak Kumar22-Nov-07 20:08 
GeneralRe: Open a word file from a web Pin
arslanjatt22-Nov-07 20:12
arslanjatt22-Nov-07 20:12 
GeneralRe: Open a word file from a web Pin
Vasudevan Deepak Kumar22-Nov-07 20:29
Vasudevan Deepak Kumar22-Nov-07 20:29 
QuestionFile.Exists Pin
troubled one22-Nov-07 19:53
troubled one22-Nov-07 19:53 
AnswerRe: File.Exists Pin
Andrei Ungureanu22-Nov-07 19:58
Andrei Ungureanu22-Nov-07 19:58 
troubled one wrote:
I've heard of the command File.Exists so that the program checks for the latest number of the counter so that it can continue with the next number.

How is this done?


File.Exists() checks to see if the file with the specified file exists on the harddrive.

troubled one wrote:
I am using StreamWriter to create a .txt file with the help of a counter. Which means, if a file is created, the title would be message1.txt. if a second file is created, the title would be message2.txt. The counter will increase everytime the button is clicked. eg. ( "message" + intCounter + ".txt")

However, when the program is closed and run again, the new content of the textbox overwrites message1.txt instead of creating a new file named "message3.txt".

You'd better save the counter in the application's settings, this way you will be sure that at the next restart of the application the counter will have the last value you saved.

Hope it helps.


I will use Google before asking dumb questions

GeneralRe: File.Exists Pin
troubled one22-Nov-07 20:03
troubled one22-Nov-07 20:03 
GeneralRe: File.Exists Pin
Andrei Ungureanu22-Nov-07 20:15
Andrei Ungureanu22-Nov-07 20:15 
AnswerRe: File.Exists [modified] Pin
Pankaj - Joshi22-Nov-07 19:59
Pankaj - Joshi22-Nov-07 19:59 
AnswerRe: File.Exists Pin
Vasudevan Deepak Kumar22-Nov-07 20:23
Vasudevan Deepak Kumar22-Nov-07 20:23 
QuestionHow to count through letters instead of numbers Pin
darthdart22-Nov-07 19:51
darthdart22-Nov-07 19:51 
AnswerRe: How to count through letters instead of numbers Pin
Vasudevan Deepak Kumar22-Nov-07 20:10
Vasudevan Deepak Kumar22-Nov-07 20:10 
QuestionRe: How to count through letters instead of numbers Pin
darthdart22-Nov-07 21:18
darthdart22-Nov-07 21:18 
AnswerRe: How to count through letters instead of numbers Pin
ChandraRam23-Nov-07 0:16
ChandraRam23-Nov-07 0:16 
GeneralRe: How to count through letters instead of numbers Pin
darthdart25-Nov-07 16:25
darthdart25-Nov-07 16:25 
QuestionRFID Pin
Aparna.B22-Nov-07 19:42
Aparna.B22-Nov-07 19:42 
AnswerRe: RFID Pin
Sun Rays22-Nov-07 19:43
Sun Rays22-Nov-07 19:43 
AnswerRe: Why do you keep reposting? Pin
Joe22-Nov-07 19:45
Joe22-Nov-07 19:45 
AnswerRe: RFID Pin
Andrei Ungureanu22-Nov-07 20:02
Andrei Ungureanu22-Nov-07 20:02 
AnswerRe: RFID Pin
Vasudevan Deepak Kumar22-Nov-07 20:12
Vasudevan Deepak Kumar22-Nov-07 20:12 
QuestionRFID Pin
Aparna.B22-Nov-07 19:37
Aparna.B22-Nov-07 19:37 
AnswerRe: RFID Pin
Joe22-Nov-07 19:43
Joe22-Nov-07 19:43 
GeneralRe: RFID Pin
Vasudevan Deepak Kumar22-Nov-07 20:14
Vasudevan Deepak Kumar22-Nov-07 20:14 

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.