Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
C# line continuation
Message
De
14/03/2009 12:38:31
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
13/03/2009 11:49:23
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01387717
Message ID:
01388065
Vues:
50
>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"
>>>
Everything except the colon at the end of the second line I assume. (grin)
Tim
Timothy Bryan
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform