Dear Googler,
In this post, how we are declare variables,classes and namespace in the programming language. Here I the VB.Net Capitalization rule
Capitalization
Follow the standard Naming Guidelines established by the .NET framework team by using only three capitalization styles: Pascal, Camel, and Upper casing.
Examples:
Identifier Type | Capitalization Style | Example(s) |
Abbreviations | Upper | ID, REF |
Namespaces | Pascal | AppDomain, System.IO |
Classes & Structs | Pascal | AppView |
Constants & Enums | Pascal | TextStyles |
Interfaces | Pascal | IEditableObject |
Enum values | Pascal | TextStyles.BoldText |
Property | Pascal | BackColor |
Variables, and Attributes | Pascal (public) Camel (private, protected, local) | WindowSize windowWidth, windowHeight |
Methods | Pascal (public, private, protected) Camel (parameters) | ToString() SetFilter( filterValue As String) |
Local Variables | Camel | recordCount |
Parameters | Camel | fileName |
Guidelines:
o In Pascal casing, the first letter of an identifier is capitalized as well as the first letter of each concatenated word. This style is used for all public identifiers within a class library, including namespaces, classes and structures, properties, and methods.
o In Camel casing, the first letter of an identifier is lowercase but the first letter of each concatenated word is capitalized. This style is used for private and protected identifiers within the class library, parameters passed to methods, and local variables within a method.
o Upper casing is used only for abbreviated identifiers and acronyms of four letters or less.
No comments:
Post a Comment