Skip to content

CodeStyle

mdkess edited this page Apr 14, 2012 · 1 revision

Generally I'm pretty relaxed about code style - make it work, and I don't care how. Here's what I'm using though (but really, do whatever you want).

Class names: CamelCase.

Interface Names: IDisposable

Member functions: someMemberFunction(float x, float y)

Local variables: someLocalVariable

Constants/enums: CAPS_WITH_UNDERSCORES

Static variables: sSomeStaticVariable

Static functions. SomeStaticFunction

Temp variables for functions. To avoid allocating memory, you don't want to create new objects in a function. Instead I prefix with the function name. For example, Vector2 update_Acceleration = new Vector2()

Clone this wiki locally