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

C#

 
GeneralRe: How to connect a MYSQL datebase which is in a Server in LAN Pin
gopal_bnvs5-Nov-09 19:02
gopal_bnvs5-Nov-09 19:02 
GeneralRe: How to connect a MYSQL datebase which is in a Server in LAN Pin
Christian Graus5-Nov-09 20:15
protectorChristian Graus5-Nov-09 20:15 
GeneralRe: How to connect a MYSQL datebase which is in a Server in LAN Pin
dan!sh 5-Nov-09 21:03
professional dan!sh 5-Nov-09 21:03 
Questionmarquee progress bar c# Pin
ghe143lhei5-Nov-09 16:28
ghe143lhei5-Nov-09 16:28 
QuestionHow to place image in the merged cell center Pin
mctramp1685-Nov-09 16:07
mctramp1685-Nov-09 16:07 
AnswerRe: How to place image in the merged cell center Pin
Mycroft Holmes5-Nov-09 16:19
professionalMycroft Holmes5-Nov-09 16:19 
AnswerRe: How to place image in the merged cell center Pin
Shameel5-Nov-09 21:38
professionalShameel5-Nov-09 21:38 
QuestionHow to lock a text file for read and write? Pin
CBenac5-Nov-09 14:23
CBenac5-Nov-09 14:23 
I need to use an incremental counter, by means of retrieving and updating a value stored in a text file

I know how to use the StreamWriter and the StreamReader classes but what I need to do is to read an int value from a text file, then increment the value by one and write it back to the file.

Is there a way to place a lock in the file while doing both operations? The reason for that is to avoid multiple concurency.
Also, how can the file be checked if it is locked?

Thanks,

CBenac
AnswerRe: How to lock a text file for read and write? Pin
Luc Pattyn5-Nov-09 14:32
sitebuilderLuc Pattyn5-Nov-09 14:32 
GeneralRe: How to lock a text file for read and write? Pin
CBenac6-Nov-09 6:42
CBenac6-Nov-09 6:42 
GeneralRe: How to lock a text file for read and write? Pin
Luc Pattyn6-Nov-09 7:10
sitebuilderLuc Pattyn6-Nov-09 7:10 
AnswerRe: How to lock a text file for read and write? Pin
Not Active5-Nov-09 15:33
mentorNot Active5-Nov-09 15:33 
QuestionProperties window not updating when selecting control in designer Pin
dybs5-Nov-09 12:36
dybs5-Nov-09 12:36 
QuestionExecuting a "string" block of code Pin
PhilipPen5-Nov-09 12:05
PhilipPen5-Nov-09 12:05 
AnswerRe: Executing a "string" block of code Pin
Luc Pattyn5-Nov-09 12:20
sitebuilderLuc Pattyn5-Nov-09 12:20 
AnswerRe: Executing a "string" block of code Pin
PIEBALDconsult5-Nov-09 12:32
mvePIEBALDconsult5-Nov-09 12:32 
GeneralRe: Executing a "string" block of code Pin
PhilipPen5-Nov-09 12:46
PhilipPen5-Nov-09 12:46 
GeneralRe: Executing a "string" block of code Pin
PIEBALDconsult5-Nov-09 13:28
mvePIEBALDconsult5-Nov-09 13:28 
AnswerRe: Executing a "string" block of code Pin
Christian Graus5-Nov-09 13:05
protectorChristian Graus5-Nov-09 13:05 
AnswerRe: Executing a "string" block of code Pin
Gerry Schmitz5-Nov-09 14:22
mveGerry Schmitz5-Nov-09 14:22 
GeneralRe: Executing a "string" block of code Pin
Gerry Schmitz5-Nov-09 14:25
mveGerry Schmitz5-Nov-09 14:25 
QuestionRegarding SqlServer smo and C# Pin
Håkan Axheim5-Nov-09 11:42
Håkan Axheim5-Nov-09 11:42 
AnswerRe: Regarding SqlServer smo and C# Pin
Christian Graus5-Nov-09 11:57
protectorChristian Graus5-Nov-09 11:57 
GeneralRe: Regarding SqlServer smo and C# Pin
Håkan Axheim5-Nov-09 12:00
Håkan Axheim5-Nov-09 12:00 
Questionignore button events on window mobile Pin
Justin Talley5-Nov-09 11:27
Justin Talley5-Nov-09 11:27 

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.