Click here to Skip to main content
15,899,679 members
Home / Discussions / C#
   

C#

 
GeneralRe: themes for windows application Pin
lnmca28-Mar-09 2:11
lnmca28-Mar-09 2:11 
GeneralRe: themes for windows application Pin
Colin Angus Mackay28-Mar-09 10:04
Colin Angus Mackay28-Mar-09 10:04 
AnswerRe: themes for windows application Pin
Ravi Bhavnani28-Mar-09 5:37
professionalRavi Bhavnani28-Mar-09 5:37 
QuestionLog file in C# Pin
mrithula827-Mar-09 19:11
mrithula827-Mar-09 19:11 
AnswerRe: Log file in C# Pin
Luc Pattyn27-Mar-09 20:47
sitebuilderLuc Pattyn27-Mar-09 20:47 
GeneralRe: Log file in C# Pin
mrithula827-Mar-09 21:02
mrithula827-Mar-09 21:02 
GeneralRe: Log file in C# Pin
Luc Pattyn27-Mar-09 21:53
sitebuilderLuc Pattyn27-Mar-09 21:53 
GeneralRe: Log file in C# Pin
Colin Angus Mackay28-Mar-09 9:58
Colin Angus Mackay28-Mar-09 9:58 
mrithula8 wrote:
Can you please explain me how i can write the start time of the corresponding servers to a text file?


He gave you the steps to work it out by yourself. In more detail he means that your code has two possible ways for a NullReferenceException to be raised.
stw1.WriteLine("UdpServer at port 10000 has started at:", start1.ToString());

Either stw1 is null or start1 is null.

You must find out why they are null and ensure they have a value or not run that line of code.

Once you have solved that you will find that the output is not what you expect. The value of start1 is not output as you have not included a placeholder for it in the text. The text string should probably read something like this:
"UdpServer at port 10000 has started at: {0}"

Note the addition of the {0}


GeneralRe: Log file in C# Pin
Colin Angus Mackay28-Mar-09 10:02
Colin Angus Mackay28-Mar-09 10:02 
AnswerRe: Log file in C# Pin
King Julien27-Mar-09 23:32
King Julien27-Mar-09 23:32 
GeneralRe: Log file in C# Pin
Colin Angus Mackay28-Mar-09 9:54
Colin Angus Mackay28-Mar-09 9:54 
GeneralRe: Log file in C# Pin
King Julien29-Mar-09 19:43
King Julien29-Mar-09 19:43 
GeneralRe: Log file in C# Pin
Colin Angus Mackay29-Mar-09 21:22
Colin Angus Mackay29-Mar-09 21:22 
QuestionRaw Mouse Input (C#) Pin
Al Mendoza27-Mar-09 15:49
Al Mendoza27-Mar-09 15:49 
AnswerRe: Raw Mouse Input (C#) Pin
Eddy Vluggen28-Mar-09 1:17
professionalEddy Vluggen28-Mar-09 1:17 
QuestionNeed some help with active MDI in a tabcontrol Pin
deaddog420127-Mar-09 15:05
deaddog420127-Mar-09 15:05 
AnswerRe: Need some help with active MDI in a tabcontrol Pin
Henry Minute28-Mar-09 11:07
Henry Minute28-Mar-09 11:07 
GeneralRe: Need some help with active MDI in a tabcontrol Pin
deaddog420129-Mar-09 7:53
deaddog420129-Mar-09 7:53 
GeneralRe: Need some help with active MDI in a tabcontrol Pin
deaddog420129-Mar-09 8:21
deaddog420129-Mar-09 8:21 
GeneralRe: Need some help with active MDI in a tabcontrol Pin
Henry Minute29-Mar-09 12:16
Henry Minute29-Mar-09 12:16 
Questionnotification ballon tip Pin
AlexPizzano27-Mar-09 14:53
AlexPizzano27-Mar-09 14:53 
AnswerRe: notification ballon tip Pin
quacks_a_lot28-Mar-09 10:09
quacks_a_lot28-Mar-09 10:09 
QuestionSubmatrix problem Pin
maxflair27-Mar-09 14:42
maxflair27-Mar-09 14:42 
AnswerRe: Submatrix problem Pin
Luc Pattyn27-Mar-09 20:55
sitebuilderLuc Pattyn27-Mar-09 20:55 
GeneralRe: Submatrix problem Pin
maxflair27-Mar-09 23:16
maxflair27-Mar-09 23:16 

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.