Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Break Long code lines in Visual Studio 2008

Tags:

In Visual Studio 2008, if I have a long line of code, how can i get that to breakup into multiple lines?

public static void somemethod(param1, param2, param3, more params etc...) 

How can I make this 1 line of code span 2 or 3 lines?

like image 777
muhan Avatar asked Aug 11 '09 22:08

muhan


People also ask

How do you break a long code line in Visual Studio?

Use the line-continuation character, which is an underscore ( _ ), at the point at which you want the line to break. The underscore must be immediately preceded by a space and immediately followed by a line terminator (carriage return) or (starting with version 16.0) a comment followed by a carriage return.

What is a line terminator VBA?

In VBA (and VB.NET) the line terminator (carriage return) is used to signal the end of a statement. To break long statements into several lines, you need to. Use the line-continuation character, which is an underscore (_), at the point at which you want the line to break.


1 Answers

Hit the enter key.

public static somemethod(param1,      param2,      param3,      more params etc...) 

...is perfectly valid.

like image 185
Tim Booker Avatar answered Sep 21 '22 12:09

Tim Booker