J
John Salerno
I just realized that the C# convention for uses braces is to put the
opening brace immediately after the first line that defines the block
(except for class declarations) like this:
if (something) {
stuff
}
Why is that? Do a lot of people do this? It seems like putting braces on
separate lines is much nicer and easier to read. In the book I'm
reading, it says it's important that the closing brace line up with the
first line (like above), I guess for readability, but how common is
this? It doesn't seem as readable as this:
if (something)
{
stuff
}
opening brace immediately after the first line that defines the block
(except for class declarations) like this:
if (something) {
stuff
}
Why is that? Do a lot of people do this? It seems like putting braces on
separate lines is much nicer and easier to read. In the book I'm
reading, it says it's important that the closing brace line up with the
first line (like above), I guess for readability, but how common is
this? It doesn't seem as readable as this:
if (something)
{
stuff
}