Click here to Skip to main content
15,907,910 members
Home / Discussions / C#
   

C#

 
AnswerA common error in design Pin
Ennis Ray Lynch, Jr.23-Jun-09 5:23
Ennis Ray Lynch, Jr.23-Jun-09 5:23 
GeneralRe: Sending mutliple messages to a sock with mutliple return messages Pin
Gareth H23-Jun-09 5:24
Gareth H23-Jun-09 5:24 
GeneralRe: Sending mutliple messages to a sock with mutliple return messages Pin
Ennis Ray Lynch, Jr.23-Jun-09 5:30
Ennis Ray Lynch, Jr.23-Jun-09 5:30 
QuestionWriting error to a browser Pin
kibromg23-Jun-09 4:46
kibromg23-Jun-09 4:46 
AnswerRe: Writing error to a browser Pin
0x3c023-Jun-09 5:17
0x3c023-Jun-09 5:17 
AnswerRe: Writing error to a browser Pin
EliottA23-Jun-09 5:18
EliottA23-Jun-09 5:18 
AnswerRe: Writing error to a browser Pin
Gary Stafford23-Jun-09 14:57
Gary Stafford23-Jun-09 14:57 
QuestionThe process cannot access the file because it is being used by another process. Pin
singhdurgesh23-Jun-09 4:42
singhdurgesh23-Jun-09 4:42 
Hi I am writting the following code to write into text file.After Checking whether the file exixt or not ,It is giving the following error.Can any one help.

Any solution to this problem would be appreciated.

public void Ping(string hostName)
{
string path;

path = @"C:\CheckList\checklist_"+DateTime.Now.ToString("yyyyMMdd")+".txt";

if (!File.Exists(path))
{

File.Create(path);


}


TextWriter tw = new StreamWriter(path,true);

Error comes when we create text writer.
AnswerRe: The process cannot access the file because it is being used by another process. Pin
Ennis Ray Lynch, Jr.23-Jun-09 4:52
Ennis Ray Lynch, Jr.23-Jun-09 4:52 
AnswerRe: The process cannot access the file because it is being used by another process. Pin
pkreddy0423-Jun-09 5:07
pkreddy0423-Jun-09 5:07 
AnswerRe: The process cannot access the file because it is being used by another process. Pin
0x3c023-Jun-09 5:19
0x3c023-Jun-09 5:19 
Questionis it possible? Pin
billy dev23-Jun-09 3:55
billy dev23-Jun-09 3:55 
AnswerRe: is it possible? Pin
DaveyM6923-Jun-09 4:03
professionalDaveyM6923-Jun-09 4:03 
GeneralRe: is it possible? Pin
EliottA23-Jun-09 4:05
EliottA23-Jun-09 4:05 
GeneralRe: is it possible? Pin
DaveyM6923-Jun-09 4:11
professionalDaveyM6923-Jun-09 4:11 
GeneralRe: is it possible? Pin
OriginalGriff23-Jun-09 4:17
mveOriginalGriff23-Jun-09 4:17 
GeneralRe: is it possible? Pin
DaveyM6923-Jun-09 4:34
professionalDaveyM6923-Jun-09 4:34 
GeneralRe: is it possible? Pin
EliottA23-Jun-09 5:26
EliottA23-Jun-09 5:26 
GeneralRe: is it possible? Pin
EliottA23-Jun-09 6:48
EliottA23-Jun-09 6:48 
GeneralRe: is it possible? Pin
OriginalGriff23-Jun-09 21:15
mveOriginalGriff23-Jun-09 21:15 
AnswerRe: is it possible? Pin
Not Active23-Jun-09 4:06
mentorNot Active23-Jun-09 4:06 
AnswerRe: is it possible? Pin
billy dev23-Jun-09 4:20
billy dev23-Jun-09 4:20 
GeneralRe: is it possible? Pin
Simon P Stevens23-Jun-09 5:19
Simon P Stevens23-Jun-09 5:19 
GeneralRe: is it possible? Pin
DaveyM6923-Jun-09 5:45
professionalDaveyM6923-Jun-09 5:45 
Questionmoving in windows form by keyboard ENTER key Pin
sachees12323-Jun-09 3:11
sachees12323-Jun-09 3:11 

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.