Java/C#/C++/[insert language here] brackets

notfred

Lifer
Feb 12, 2001
38,241
4
0
I do this:

public method(){

}

When I'm using Visual Studio, it automatically changes that to:

public method()
{

}

And I don't have a real strong preference either way, so I let VS do its thing.
 

Supermercado

Diamond Member
Jan 18, 2002
5,893
0
76
I used to do method 2 but for some reason, I switched to method 1 (may have been a teacher's requirement, but I can't remember for sure) and now that's all I use.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
2 for me. I'm just used to it because Visual Studio defaults to that style.
 

EyeMWing

Banned
Jun 13, 2003
15,670
1
0
I do

public blahblah { you=suck } for stupid stuff,
public blahblah2
{
you=still.suck
}
for everything else.
 

jessicak

Senior member
Aug 15, 2003
542
0
0
method 2...I like it better but I was initially forced to do it that way, so that might also be why I like it better.
 

oog

Golden Member
Feb 14, 2002
1,721
0
0
i started with 1, because i think that that is what was recommended in some c++ coding standards for some GNU software i was working on back in the early 90s, but since then, i switched to 2.
 

2

i used to do 1, but the other 3 developers where i work use the 2nd way so i switched
 

eLiu

Diamond Member
Jun 4, 2001
6,407
1
0
I've always done

someword
{
some bad code
}

I think it's easier to see that way