Solved

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

Posted on 2004-08-02
2
332 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 500 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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now