Coding Standards To Be Used - camfush/Battleship GitHub Wiki
Indentation
Because of VB’s use of whitespace in structuring, once the code has been changed to C#, we might need to change the indentation to reflect the coding standard. Each time a section of code is enclosed within block delimiters, that section should be one step further indented than the previous code.
Comments
Comments which span multiple rows should use multiline commenting (/* example comment */), rather than many single row comments as is used in the current code comments. In the visual basic code, all comments follow the XML structure. We will need to discuss the merits of this with the client, as validating any and all comments to adhere to XML structure will increase the workload, but may be a requirement, especially if other programs are expected to be accessing the code comments rather than just other humans.
Variable Names
We will use Hungarian Notation for all variables and functions which are publicly accessed. Private variables will still follow this format but will be preceded by an underscore. Currently, most variables are in Camel Case, where the first word is capitalised. As a result, we will need to spend some time bringing these variables into the Hungarian format.
White Space
Each line of code will be placed on its own line. Proper indentation, as has already been covered, will be used to space out blocks of code. Line break may be used to separate related sections of code, but no more than one empty line will be used in a row.