Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
C# line continuation
Message
From
13/03/2009 11:49:23
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
 
 
To
13/03/2009 11:28:28
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01387717
Message ID:
01387760
Views:
129
Thank you. I think the second example was what I had in mine.

>
string myText = @"Blah blah blah
>   blah blah
>   blah";   && Spaces and newlines characters will be part of the string
>
>string myText = "Blah blah blah"
>   + "blah blah:
>   + "blah";   && Small compile time hit
>
>StringBuilder myText = new StringBuilder("Blah blah blah");
>myText.Add("blah blah");
>myText.Add("blah");   && Runtime hit
BTW, in C#, a line isn't finished until you enter a ";"
>
>>For some reason I can't find this on google... I must be searching for the wrong term.
>>
>>How do I make this work:
>>
>>string myText = "Blah blah blah"
>>                             "blah blah"
>>                             "blah"
>>
Very fitting: http://xkcd.com/386/
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform