Click here to Skip to main content
15,913,685 members
Home / Discussions / C#
   

C#

 
GeneralRe: displaying a baloon message from task bar Pin
Rocky#23-Mar-07 20:30
Rocky#23-Mar-07 20:30 
GeneralRe: displaying a baloon message from task bar Pin
Stefan Troschuetz23-Mar-07 23:11
Stefan Troschuetz23-Mar-07 23:11 
GeneralRe: displaying a baloon message from task bar Pin
Rocky#25-Mar-07 0:50
Rocky#25-Mar-07 0:50 
GeneralRe: displaying a baloon message from task bar Pin
Stefan Troschuetz25-Mar-07 1:52
Stefan Troschuetz25-Mar-07 1:52 
GeneralRe: displaying a baloon message from task bar Pin
Rocky#26-Mar-07 2:59
Rocky#26-Mar-07 2:59 
AnswerRe: displaying a baloon message from task bar Pin
Muammar©23-Mar-07 10:53
Muammar©23-Mar-07 10:53 
QuestionInserting a huge text file into oracle table Pin
Furi Goled23-Mar-07 6:57
Furi Goled23-Mar-07 6:57 
Questioncreate and write in to the file Pin
Nkuttynasi23-Mar-07 6:55
Nkuttynasi23-Mar-07 6:55 
In .net 2005 I have created Application

I want to create a log file, which maintains all the internal process so at the run time I want to create a file at the source

Code:

Private string LogFileName = "ADM_Log.txt";

LogFileName = Application.ExecutablePath + "\\" + LogFileName;

This return path like this

"F:\\Joe Don't Delete\\DotNet_Samples\\ADM\\ADM\\ADM\\bin\\Debug\\ADM.EXE\\ADM_Log.txt"

1. Why the path is return with \\?
2. If I use this path in

Code:
File.Create(LogFileName);

The error message is shown like this:"Could not find a part of the path 'F:\\Joe Don't Delete\\DotNet_Samples\\ADM\\ADM\\ADM\\bin\\Debug\\ADM.EXE\\ADM_Log.txt'."

If i give manually path with single \

It creates the File.

Then

I use this function to write information in the file
At first the file is created in single \ then it goes to this function
At first line of this function it throws message "the file is exclusively opened by another user"


Private void WriteLog(string sMessage)
{

StreamWriter sw1 = File.AppendText(LogFileName);
sMessage = ("::" + sMessage);
sw1.WriteLine(sMessage);
sw1.Close();
}


Please help me these all my problems

Thank u

AnswerRe: create and write in to the file Pin
Christian Graus23-Mar-07 7:04
protectorChristian Graus23-Mar-07 7:04 
GeneralRe: create and write in to the file Pin
Nkuttynasi26-Mar-07 3:06
Nkuttynasi26-Mar-07 3:06 
Questionerror in web page loaded on window form Pin
Saira Tanwir23-Mar-07 6:54
Saira Tanwir23-Mar-07 6:54 
AnswerRe: error in web page loaded on window form Pin
Christian Graus23-Mar-07 7:01
protectorChristian Graus23-Mar-07 7:01 
AnswerRe: error in web page loaded on window form Pin
Saira Tanwir23-Mar-07 7:14
Saira Tanwir23-Mar-07 7:14 
Questionwindows service Pin
arkiboys23-Mar-07 6:50
arkiboys23-Mar-07 6:50 
AnswerRe: windows service Pin
led mike23-Mar-07 6:54
led mike23-Mar-07 6:54 
GeneralRe: windows service Pin
arkiboys23-Mar-07 6:58
arkiboys23-Mar-07 6:58 
GeneralRe: windows service Pin
Christian Graus23-Mar-07 7:44
protectorChristian Graus23-Mar-07 7:44 
GeneralRe: windows service Pin
arkiboys25-Mar-07 21:42
arkiboys25-Mar-07 21:42 
QuestionHow to maximize the main form at load time? Pin
sinosoidal23-Mar-07 6:17
sinosoidal23-Mar-07 6:17 
AnswerRe: How to maximize the main form at load time? Pin
Christian Graus23-Mar-07 6:35
protectorChristian Graus23-Mar-07 6:35 
AnswerRe: How to maximize the main form at load time? Pin
Saira Tanwir23-Mar-07 6:39
Saira Tanwir23-Mar-07 6:39 
GeneralRe: How to maximize the main form at load time? Pin
sinosoidal23-Mar-07 6:41
sinosoidal23-Mar-07 6:41 
QuestionHow to show a "Process with ..." entry in the File-Explorer context menu Pin
AlexZieg7123-Mar-07 6:14
AlexZieg7123-Mar-07 6:14 
AnswerRe: How to show a "Process with ..." entry in the File-Explorer context menu Pin
Stefan Troschuetz23-Mar-07 11:01
Stefan Troschuetz23-Mar-07 11:01 
GeneralRe: How to show a "Process with ..." entry in the File-Explorer context menu Pin
AlexZieg7123-Mar-07 12:47
AlexZieg7123-Mar-07 12:47 

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.