Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get string "\r\n" converted to real CR LF while in debug mode?

Posted on 2004-08-02
2
Medium Priority
?
358 Views
Last Modified: 2012-08-14
I'm using Visual Studio C#. For readability, I often build strings which contain ... \r \n \t \" ... for things like dynamic JavaScripts, dynamic TSQL, dynamic street address blocks, etc. But when I'm programming, I sometimes want to stop in debug mode, look at the IDE's LOCALS or AUTO tab and "see" what the final string looks like. Unfortunately, the string is shown with \r\n or \t.

Does anyone know an IDE "TRICK" for gettting a fully rendered string with ALL replacements complete ... while stopped in debug mode?

Thanks
Frederick
0
Comment
Question by:volking
2 Comments
 
LVL 12

Accepted Solution

by:
vascov earned 2000 total points
ID: 11699283
There's a very easy way actually.

Use the Immediate window of VS.NET (Ctrl+Alt+I), and then just use some code lines:

Console.WriteLine( someString )
System.Diagnostics.Debug.WriteLine( someString )
System.Windows.Forms.MessageBox.Show( someString )

hth

Vasco
0
 
LVL 5

Author Comment

by:volking
ID: 11704055
vascov ... works GREAT!
Thanks ...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question