Write to immediate window

T

Tim Cowan

Hi

How do I write to the immediate window in a C# web project? I want to use it
for debugging. When I used VB I would write Debug.Print.

What is the equivalent for C#?

Thanks

Tim Cowan
 
G

Gerry O'Brien [MVP]

Same thing, almost

Ensure you have,

using System.Diagnostics;

at the top of your code file. Then use Debug.Write() or Debug.Writeline().
 
T

Tim Cowan

Thanks, that's it!

Gerry O'Brien said:
Same thing, almost

Ensure you have,

using System.Diagnostics;

at the top of your code file. Then use Debug.Write() or
Debug.Writeline().
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top