Coding standards

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 9: Line 9:
 
  public void LazeAround()
 
  public void LazeAround()
 
  {
 
  {
     // Do nothing
+
     Thread.Sleep(3600);
 
  }
 
  }
  
 
Otherwise in general, just respect the conventions already being used in the file you're editing (which should often follow the [http://msdn.microsoft.com/en-us/library/czefa0ke.aspx standard C# coding guidelines]).
 
Otherwise in general, just respect the conventions already being used in the file you're editing (which should often follow the [http://msdn.microsoft.com/en-us/library/czefa0ke.aspx standard C# coding guidelines]).

Revision as of 20:54, 4 July 2008

Generally speaking

  • We put curly brackets on separate lines and use 4 space tabs.
  • Tab themselves should be spaces, not actual hard tabs.
  • Method names have all their words capitalized (as opposed to Java, which culturally uses camelCase).

For instance.

public void LazeAround()
{
    Thread.Sleep(3600);
}

Otherwise in general, just respect the conventions already being used in the file you're editing (which should often follow the standard C# coding guidelines).

Personal tools
General
About This Wiki