Click here to Skip to main content
15,902,636 members
Home / Discussions / C#
   

C#

 
AnswerRe: move user to different tab and txt field Pin
Martin#9-Aug-07 19:49
Martin#9-Aug-07 19:49 
QuestionC# bug or any mistake Pin
Xmen Real 9-Aug-07 17:56
professional Xmen Real 9-Aug-07 17:56 
AnswerRe: C# bug or any mistake Pin
Michael Sync9-Aug-07 18:11
Michael Sync9-Aug-07 18:11 
GeneralRe: C# bug or any mistake Pin
Xmen Real 9-Aug-07 18:13
professional Xmen Real 9-Aug-07 18:13 
QuestionHelp! Monitor an application Pin
chuongkl779-Aug-07 17:22
chuongkl779-Aug-07 17:22 
AnswerRe: Help! Monitor an application Pin
Michael Sync9-Aug-07 17:46
Michael Sync9-Aug-07 17:46 
JokeRe: Help! Monitor an application Pin
Judah Gabriel Himango9-Aug-07 18:12
sponsorJudah Gabriel Himango9-Aug-07 18:12 
GeneralRe: Help! Monitor an application Pin
Martin#9-Aug-07 20:11
Martin#9-Aug-07 20:11 
GeneralRe: Help! Monitor an application Pin
Michael Sync9-Aug-07 20:31
Michael Sync9-Aug-07 20:31 
QuestionDirListBox and Root Pin
swjam9-Aug-07 15:43
swjam9-Aug-07 15:43 
AnswerRe: DirListBox and Root Pin
Judah Gabriel Himango9-Aug-07 17:29
sponsorJudah Gabriel Himango9-Aug-07 17:29 
GeneralRe: DirListBox and Root Pin
swjam9-Aug-07 17:44
swjam9-Aug-07 17:44 
GeneralRe: DirListBox and Root Pin
Michael Sync9-Aug-07 18:07
Michael Sync9-Aug-07 18:07 
GeneralRe: DirListBox and Root Pin
swjam9-Aug-07 18:17
swjam9-Aug-07 18:17 
GeneralRe: DirListBox and Root Pin
Michael Sync9-Aug-07 19:52
Michael Sync9-Aug-07 19:52 
GeneralRe: DirListBox and Root Pin
Judah Gabriel Himango9-Aug-07 18:08
sponsorJudah Gabriel Himango9-Aug-07 18:08 
Questionhelp me out with this.. urgent!! Pin
chumairr9-Aug-07 15:41
chumairr9-Aug-07 15:41 
AnswerRe: help me out with this.. urgent!! Pin
Luc Pattyn9-Aug-07 16:14
sitebuilderLuc Pattyn9-Aug-07 16:14 
AnswerWell let me drop everything and run to the rescue... Pin
leckey10-Aug-07 3:03
leckey10-Aug-07 3:03 
QuestionFile access is denied Pin
rkcsharp9-Aug-07 15:37
rkcsharp9-Aug-07 15:37 
AnswerRe: File access is denied Pin
Guffa9-Aug-07 15:53
Guffa9-Aug-07 15:53 
Are you closing the file properly?

If you leave the file open, it will eventually get closed when the stream object is finalized by the garbage collector. This may happen at any time, and would typically show the behaviour that you are experiencing.

Preferably you would use a using block to make sure that the file is always closed properly. Example:

using (StreamWriter writer = File.CreateText(@"c:\test.txt")) {
   writer.WriteLine("Hello world.");
}


The StreamWriter (and the underlying FileStream) will automatically be closed and disposed at the closing }.

---
single minded; short sighted; long gone;

GeneralRe: File access is denied Pin
rkcsharp9-Aug-07 16:15
rkcsharp9-Aug-07 16:15 
AnswerRe: File access is denied Pin
Luc Pattyn9-Aug-07 16:16
sitebuilderLuc Pattyn9-Aug-07 16:16 
GeneralRe: File access is denied Pin
rkcsharp9-Aug-07 16:28
rkcsharp9-Aug-07 16:28 
AnswerRe: File access is denied Pin
rkcsharp9-Aug-07 16:33
rkcsharp9-Aug-07 16:33 

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.