Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
New line in textbox
Message
From
08/07/2005 10:03:29
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
08/07/2005 09:58:33
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01030410
Message ID:
01030426
Views:
18
>\n is still valid for console apps. Use Environment.NewLine so it would be portable (winforms,webforms).
>
>
>TxtResult.Text = "Line 1" + Environment.NewLine + "Line2";
>
>This alternative (similar to text...endtext) is also valid:
>
>TxtResult.Text = @"Line 1
>Line2";
>
Cetin

Thanks. I suppose the "@" sign makes the compiler treat the remaining text just as it is typed?
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform