473,323 Members | 1,560 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 software developers and data experts.

Debug WritLine Oddity


When I run this line,

Debug.WriteLine("I am in OnHandler2 and MyEventArgs is {0}", e.m_id);

and e.m_id = "Event args for event 1"

What prints in the debug window is:

Event args for event 1: I am in OnHandler1 and MyEventArgs is {0}

Why?
Nov 9 '05 #1
2 1518
I don't think Debug.Writeline has that overloaded method...

Debug.Writeline(format as string, arg0 as Object) ' doesn't exist does it?

I think you are actually calling Debug.Writeline(message as string, category
as string)

Unlike,
Console.Writeline(format as string, arg0 as Object)

I am never quite sure when and where I can use {0} either.

Greg

"John A. Bailo" <ja*****@texeme.com> wrote in message
news:9J********************@speakeasy.net...

When I run this line,

Debug.WriteLine("I am in OnHandler2 and MyEventArgs is {0}", e.m_id);

and e.m_id = "Event args for event 1"

What prints in the debug window is:

Event args for event 1: I am in OnHandler1 and MyEventArgs is {0}

Why?

Nov 9 '05 #2
Debug.WriteLine(message, category). The value of "category" was not
printed.
To format, use Debug.WriteLine(String.Format(message, params));

If it is a console app, you might want to use Console.WriteLine instead?

Nov 9 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Michael Foord | last post by:
Here's a little oddity with 'print' being a reserved word... >>> class thing: pass >>> something = thing() >>> something.print = 3 SyntaxError: invalid syntax >>> print something.__dict__...
8
by: Davy | last post by:
Hi all, I use VC and gcc/gdb to compile and debug C/C++ files. But I found some of the debug version of the compiled files are too large to be run in a small RAM. Can I compile C/C++ Debug...
2
by: John A. Bailo | last post by:
When I run this line, Debug.WriteLine("I am in OnHandler2 and MyEventArgs is {0}", e.m_id); and e.m_id = "Event args for event 1" What prints in the debug window is: Event args for event...
5
by: jmdocherty | last post by:
All, I've been trying to set up a CSS layout and all seems well in Firefox but in Safari it just seems to be plain weird! I hope someone can help tell me whether this is a problem with my code...
43
by: michael.f.ellis | last post by:
The following script puzzles me. It creates two nested lists that compare identically. After identical element assignments, the lists are different. In one case, a single element is replaced. In...
1
by: bixbarton | last post by:
Running C# .NET 1.1 I'm experiencing a weird oddity. We have a client app which access the webservice at http://www.test.planningportal.gov.uk/soap/servlet/messagerouter If I start the...
6
by: Rex the Strange | last post by:
Hello all, Traditionally I'm a Delphi and VB6 programmer and have recently started working with VB.NET (which, I might add, I love, but that's beside the point). Anyway, I was trying to make a...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
3
by: rorni | last post by:
Hi, I'm porting code from Windows to HP-UX 11, compiling with g++. I'm getting a compilation error on the system's debug.h include file, which is included very indirectly through a series of...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.