Visual Basic Language Features and Usage: May Ann N. Veloria January 17, 2017 COE 221
Visual Basic Language Features and Usage: May Ann N. Veloria January 17, 2017 COE 221
Collection Initializers
Describes collection initializers, which enable you to create a collection and
populate it with an initial set of values.
Control Flow
Shows how to regulate the flow of your program's execution.
Data Types
Describes what kinds of data a programming element can hold and how that data is
stored.
Declared Elements
Covers programming elements you can declare, their names and characteristics, and how
the compiler resolves references to them.
Delegates
Provides an introduction to delegates and how they are used in Visual Basic.
Events
Shows how to declare and use events.
Interfaces
Describes what interfaces are and how you can use them in your applications.
LINQ
Provides links to topics that introduce Language-Integrated Query (LINQ) features and
programming.
Procedures
Describes Sub, Function, Property, and Operator procedures, as well as advanced
topics such as recursive and overloaded procedures.
Statements
Describes declaration and executable statements.
Strings
Provides links to topics that describe the basic concepts about using strings in
Visual Basic.
Variables
Introduces variables and describes how to use them in Visual Basic.
XML
Provides links to topics that describe how to use XML in Visual Basic.
STEPS ON HOW TO PROGRAM IN VISUAL BASIC
1. Gather and Analyze the Program Requirements.
Identifies the program requirements and documents these
requirements.
SYNTAX ERROR
Syntax errors are those that appear while you write code. Visual Basic checks your
code as you type it in the Code Editor window and alerts you if you make a mistake,
such as misspelling a word or using a language element improperly. Syntax errors are
the most common type of errors. You can fix them easily in the coding environment as
soon as they occur.
- Note
The Option Explicit statement is one means of avoiding syntax errors. It forces you
to declare, in advance, all the variables to be used in the application. Therefore,
when those variables are used in the code, any typographic errors are caught
immediately and can be fixed.
LOGICAL ERROR
Logic errors are those that appear once the application is in use. They are most
often unwanted or unexpected results in response to user actions. For example, a
mistyped key or other outside influence might cause your application to stop working
within expected parameters, or altogether. Logic errors are generally the hardest
type to fix, since it is not always clear where they originate.