Lecture Set 3 Introduction to Visual Basic Concepts Part D– Some Standard Coding Conventions 8/2/2013 3:07 PM
Objectives Provide a view of code generated by the .NET C# Compiler Review the syntax for referring to controls and for writing event handlers Review code style recommendations (so that you and others can read your code)
Syntax Issues - 1
Syntax Issues - 2
Syntax Issues - 3
Syntax Issues - 4
Syntax Issues - 5
Event Response
More on Event Handling
Event Handlers - code
Coding Style Issues
Coding Style Issues - Comments
Comments (Best Practices) Create comments when developing or modifying an application Create a comment block at the beginning of a class or module to describe its purpose Create comment blocks for procedures Don’t overuse or create unnecessary comments
The Default List of Code Snippets
Syntax Errors – What You Will See
Syntax Errors – What You Will See
New Coding Features in C# (Look these up in your text – learn how to use them) Programming with code snippets Saved patterns Use Code Snippet Manager to add and delete snippets from the default list Rename Identifiers Change all occurrences – several mechanisms Smart Compile Auto Correction Used to show syntax error correction options When available, use bar to right of line in question The My feature May not seem useful now – but will later
Other Topics to Study More useful skills for working in the Code Editor Use toolbar buttons Expand or collapse code Print source code How to get help How to run, test, and debug ad project