instead of CantSeek). Optionally, you can also prefix Boolean properties with or but only “Is,” “Can,” “Has” where it adds value. Non-public camelCasing Noun or Adjective. private string name; private string Field or Do be consistent in a code sample _camelCasing when you use the '_' prefix. PascalCasing Verb or Verb phrase // A close event that is raised after the window is Do give events with a concept of closed. before and after, using the present public event WindowClosed and past tense. // A close event that is Do not use or “Before” “After” raised before a window is prefixes or postfixes to indicate pre closed. and post events. public event WindowClosing Delegate PascalCasing Do add the suffix to public delegate ‘EventHandler’ WindowClosedEventHandler names of delegates that are used in events. Do add the suffix to names ‘Callback’ of delegates other than those used as event handlers. Do not add the suffix to a “Delegate” delegate. Interface PascalCasing Noun public interface IDictionary prefix ‘I’ Noun Constant PascalCasing public string MessageText = "A"; for publicly private string visible; messageText = "B"; camelCasing public double PI = 3.14159...; for internally visible; All capital only for abbreviation of one or two long. Parameter, camelCasing Noun int customerID; Variable Generic Type PascalCasing Noun T, TPolicy Parameter prefix Do name generic type parameters ‘T’ with descriptive names, unless a single-letter name is completely and a descriptive name would not add value. Do prefix descriptive type parameter names with T.
instead of CantSeek). Optionally, you can also prefix Boolean properties with “Is,” “Can,” or “Has” but only where it adds value. Non-public Field camelCasing or _camelCasing Noun or Adjective. Do be consistent in a code sample when you use the '_' prefix. private string name; private string PascalCasing Verb or Verb phrase Do give events with a concept of before and after, using the present and past tense. Do not use “Before” or “After” prefixes or postfixes to indicate pre and post events. // A close event that is raised after the window is closed. public event WindowClosed // A close event that is raised before a window is closed. public event WindowClosing Delegate PascalCasing Do add the suffix ‘EventHandler’ to names of delegates that are used in events. Do add the suffix ‘Callback’ to names of delegates other than those used as event handlers. Do not add the suffix “Delegate” to a delegate. public delegate WindowClosedEventHandler Interface PascalCasing ‘I’ prefix Noun public interface IDictionary Constant PascalCasing for publicly visible; camelCasing for internally visible; All capital only for abbreviation of one or two long. Noun public string MessageText = "A"; private string messageText = "B"; public double PI = 3.14159...; Parameter, Variable camelCasing Noun int customerID; Generic Type Parameter PascalCasing ‘T’ prefix Noun Do name generic type parameters with descriptive names, unless a single-letter name is completely and a descriptive name would not add value. Do prefix descriptive type parameter names with T. T, TPolicy
all-in-one-code-framework-coding-standards.docx