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?
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.
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.
Hit the enter key.
public static somemethod(param1, param2, param3, more params etc...)
...is perfectly valid.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With