Coding Conventions

Member Variables

The coding conventions for ConnectBasic are based largely on my experience working with a mixed C#/VB code base - in this environment, certain de facto practices in the C# world break down completely, for example giving properties and backing fields the same name but differing only in case.

Because of this, member variables in ConnectBasic are prefixed with the letter "m", e.g:

private string mMyString;

public string MyString
{
get { return mMyString; }
set { mMyString = value; }
}

Similarly, static member variables are prefixed with the letter "s".

Public APIs

  • Public APIs should follow standard .NET Framework guidelines, e.g PascalCase for public members, camelCase for parameters, etc.
  • Public APIs should be spelt using American English for consistency and easier international use.
  • Public APIs should have XML documentation comments.

Last edited Jun 1, 2009 at 10:43 PM by PhilipStears, version 1

Comments

No comments yet.