Click or drag to resize

Naming conventions and keywords

gradient

Naming Conventions

A naming convention is a set of rules for choosing the names for the identifiers in your program. The most often used naming conventions are the Camel notation and the Pascal notation.

In Camel notation, names begin with a lowercase letter. Multi-word names (such as “my variable”) are written with no spaces and no underscore and with each word after the first capitalized. Thus, the correct name for “my variable” in Camel notation is myVariable.

Pascal notation is just like Camel notation except that the first letter is also uppercase (i.e. the correct name for “my variable” in Pascal notation is MyVariable.).

Crestron uses Camel notation for variables, method parameter, delegates and events and Pascal notation for constants, type names and names of classes and methods.

 

Suggested Identifier Naming Styles:

 

Style Name

Description

Recommended Use

Example

Pascal notation

Each word in the identifier is capitalized

constants, type names, names of methods and classes

MyType

Camel notation

Each word in the identifier, except the first, is capitalized

local variables, method parameters, delegates and events

myVariable

Uppercase

Composed of all uppercase letters

abbreviations

IO

 

Keywords

 

SIMPL# supports all C# keywords, with the exception of the unsafe, fixed and stackalloc keywords.

 

footer
Crestron Blue 400 x 100

Copyright (C) 2013 to the present, Crestron Electronics, Inc. All rights reserved. No part of this work may be reproduced in any form, machine or natural, without the express written consent of Crestron Electronics.