Solved

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

Posted on 2004-08-02
2
349 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

628 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