long line of code
Created at 16 Nov 2014, 09:42
NE
long line of code
16 Nov 2014, 09:42
If I have a long line of code (complex if statement or a long Print line) how do I split the code over more than one line?
Thanks
AlexanderRC
19 Nov 2014, 15:28
RE:
newrick1962 said:
C# syntax allows you insert new lines almost everywhere you like. As an extra precaution precaution I advise you to start a new line which part of statement with an operator (arithmetic, logic, etc.) which is part of an original statement. Adding an indent before the operator would be helpful too, but that depends on you code style. If you later go back to the code to read and modify it, it would be obvious that the line is a part of multiline statement due the leading operator.
Also see C# Coding Conventions. There are some example how a statement can be split.
@AlexanderRC