Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line Continuation 1

Status
Not open for further replies.

stnkyminky

Programmer
Oct 15, 2001
476
US
VB

Dim foo as string = "This is a sample " & _
"of line continuation"


How would I accomplish this in C#? I've tried just using (;) at the end of each line but I rcv and error.

string foo;
foo = "This is a sample ";
"of line continuation";

Scott
Programmer Analyst
<{{><
 
Code:
string foo;
foo = &quot;This is a sample &quot; +
      &quot;of line continuation&quot;;
-obislavu-
 
stnkyminky -

If you're doing a lot of that, it's better to use a StringBuilder object (from System.Text), as it results in less memory thrash (i.e. much faster).

Chip H.


If you want to get the best response to a question, please check out FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top