The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
Whatever the style, most important is the consistency of the style. I have my own style choices for my personal projects, but then when I have to dive into shared code, I adopt whatever the style which has been chosen. It doesn't prevent me from quickly getting a method or class functionality, provided there is some consistency across the codebase. Everything else are just opinions, and, well, you know about opinions, don't you?...
"I'm neither for nor against, on the contrary." John Middle
Use what pleases your eyes: you are the one looking at it !
Same as you; mostly because I use the format document/selection menu option in Visual Studio to tidy up code and it's left at the defaults.
Yeah, I just tried that -- VS formatted it back to option 1.
And it's such a useful feature with the html, I guess I'll have to either figure out if it's possible to tell the formatter to use C# style, or live with it, which I've pretty much gotten used to at this point anyways.
I agree with others that it's a matter of personal taste or it's defined by company's coding style / culture.
Whatever the case is, I think the only important thing is to stay consistent.
However, that example actually uses both styles so I don't think it's good idea to follow their styling...
Last Visit: 22-Oct-19 6:07 Last Update: 22-Oct-19 6:07