public string GetSomething()
{
return something;
}
public string GetSomething()
{
return something;
}
if (height < MinHeight) {
//...
}
while (isTrue) {
//...
}
switch (foo) {
//...
}
if (height < MinHeight)
{
//...
}
while (isTrue)
{
//...
}
switch (foo)
{
//...
}
if (height < MinHeight){
//...
}
while (isTrue){
//...
}
switch (foo){
//...
}
const string FooBar = "baz";
const string FOO_BAR = "baz";
Condition with space
if (true) {
//...
}
while (true) {
//...
}
switch (v) {
//...
}
if(true) {
//...
}
while(true) {
//...
}
switch(v) {
//...
}
public void SetName(string name) {
// ...
}
if(isTrue) {}
while(isTrue) {}
public void SetName( string name ) {
// ...
}
if( isTrue ) {}
while( isTrue ) {}
/* width is within 80 characters */
/* width is within 120 characters */
/* width is within 150 characters */
static string name;
static string s_name;
static string __name;
string property;
public string Property { get { return property; } }
string _property;
public string Property { get { return _property; } }
string m_property;
public string Property { get { return m_property; } }
private void DoSomething()
{}
private void doSomething()
{}
What about elses?
These are the 3 main styles I think