Is there a guide where I can read up on the rules of breaking lines to keep within columns?
I have the following code and my margin is set to 80 characters (so that it fits into an A4 page when I print):
IDictionary<string, object> columns = new Dictionary<string, object>(1);
The parantheses fall just at the 80th column. So, should I break it up like this:
IDictionary<string, object> columns = new Dictionary<string, object>
(1);
or this:
IDictionary<string, object> columns = new Dictionary
<string, object>(1);
or this:
IDictionary<string, object> columns =
new Dictionary<string, object>(1);
or any other way? I prefer not to increase the margin.
Thanks.
80 characters in line is not a law – it’s nice to have. And best option here is:
Never break type name, generic parameters, and opening bracket (it’s OK to continue on next line if you have many parameters). So, options also (the best one – forget about 80 characters and put all into one line):
and (if line is really long)
or split assignment and declaration