Escape characters in text box
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I'm converting a C++ application to C# (yes - I know, dumb thing to do). The issue I've run into is when I put text into a text box, in C++ I could just add a \n to get a new line. Now, in C# text boxes, I have to add \r\n to get the same result. Why? Is there anyway I can get around this? - Bruce BRCKCC
-
I'm converting a C++ application to C# (yes - I know, dumb thing to do). The issue I've run into is when I put text into a text box, in C++ I could just add a \n to get a new line. Now, in C# text boxes, I have to add \r\n to get the same result. Why? Is there anyway I can get around this? - Bruce BRCKCC
you can use System.Environment.NewLine to add the new string.