Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String literal in multiple lines in C#
Message
From
22/04/2007 05:35:34
 
 
To
All
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
String literal in multiple lines in C#
Environment versions
Environment:
C# 2.0
Miscellaneous
Thread ID:
01218662
Message ID:
01218662
Views:
54
I have long single line string literals containing " characters in code like

switch (expr) {
case @"IR(""xxx"")+sql('sele tasudok from dok x where doktyyp+str(dokumnr,7)= ""G""+str(dok.krdokumnr,7) ','')":

For code readability I need to split them to multiple lines so that vlaue remains same. I tried

switch (expr) {
case "IR(\"xxx\")+\
sql('sele tasudok from dok x \
where doktyyp+str(dokumnr,7)= \"G\"+\
str(dok.krdokumnr,7) ','')":

But got compile error. Any idea ?
Andrus
Next
Reply
Map
View

Click here to load this message in the networking platform