Programming with Visual Basic

2 DAY COURSE - £650 plus VAT

Synopsis

This class is an introduction to the Visual Basic (formerly VB.NET) programming language. It will cover the concepts and building blocks of the Visual Basic programming language, such as how .NET is different from traditional programming, defining variables, control structures, operators, classes and methods. It will provide delegates with a skill base from which they can go on to develop .NET applications on either the Windows Forms or ASP.NET platforms.

Please note that this is the .NET version of Visual Basic (version 7 and above). It is not suitable if you want to learn VB6 or below, or Visual Basic for Applications (VBA). Please contact us if you are unsure if this is the right course for your VB requirements.

Duration

2 days

Cost

£650 plus VAT

Prerequisites

There are no prerequsites for this course

Detailed course contents

Introduction to .NET

  • What is .NET?
  • Common Language Runtime (CLR)
  • Common Type System (CTS)

Introduction to Visual Basic

  • What is Visual Basic.NET?
  • Getting started with Visual Basic
  • Visual Studio IDE

Getting started

  • Creating a project
  • The Main procedure
  • Visual Basic basics
  • Displaying to the console screen
  • Adding comments
  • Compiling and running the program from the command line
  • Compiling and running the program using Visual Studio

Variables

  • Variables in Visual Basic
  • Declaring variables
  • Variable name rules
  • Visual Basic keywords
  • Assigning a value to a variable
  • Strings
  • Character data types
  • Numeric data types
  • Signed and Unsigned
  • Byte
  • Signed Byte
  • Short Integers
  • Unsigned Short Integers
  • Signed Integers
  • Unsigned Integers
  • Long Integers
  • Unsigned Long Integers
  • Real Numbers: Single
  • Double-Precision Numbers
  • Decimal
  • The Boolean Data Type
  • The Date Data Type
  • Assigning a Date value
  • Default variable values
  • Constants
  • Visual Basic / .NET Data Types
  • VB / .NET Data Type equivalents

Data type conversion, properties and methods

  • About data type properties and methods
  • String properties: Length
  • String methods: PadLeft and PadRight
  • String method: Substring
  • More String methods
  • Date properties
  • Shared Date properties
  • Date methods
  • Converting Date to a String
  • Date format masks
  • Converting numeric data to string
  • Implicit and explicit conversion
  • Using Parse to convert data types
  • Using TryParse to convert data types
  • System.Convert

Operators

  • Visual Basic operators
  • The + operator
  • The & operator
  • The -, * and / operators
  • The += addition assignment operator
  • The -=, *= and /= operators
  • Logical operators: =
  • Logical operators: <>
  • Logical operators: < and >
  • Logical operators: <= and >=
  • Logical ‘and’ Conjunction: And
  • Conditional ‘and’ Conjunction: AndAlso
  • The Binary ‘or’ operator: Or
  • The Conditional ‘or’ operator: OrElse
  • The exclusive ‘or’ operator: Xor

Conditional logic

  • Conditional control: If / Then
  • Conditional control: If / Then cont.
  • Using If on a single line
  • Conditional control: Else
  • If .. ElseIf
  • If .. ElseIf .. Else
  • The Ternary If Operator
  • Case Switches
  • GoTo

Loops

  • The While loop
  • While cont.
  • Do…While
  • Do...Until
  • The For..Next loop
  • Exiting out of a loop
  • Continuing a loop

Procedures

  • Procedures of a class
  • Types of procedure
  • Sub procedures
  • Declaring a sub procedure
  • Procedure parameters
  • Specifying procedure parameters
  • Optional parameters
  • Overloading a sub procedure
  • Functions
  • What are functions?
  • Calling functions
  • Declaring a function
  • Returning a value from a function
  • Overloading a function

Introduction to Classes

  • Object oriented programming
  • Classes
  • Objects
  • Member variables
  • Creating a class
  • Creating a class in its own file
  • Creating an object
  • Assigning a value to an object
  • Accessing class members
  • Objects as parameters and return types
  • Reference types
  • Access modifiers
  • The Public access modifier
  • The Private access modifier

Properties

  • Encapsulation
  • Properties
  • Coding a Property
  • Implementing a Property
  • Accessing a property
  • Read only Properties
  • Write only Properties

Constructors

  • What are constructors?
  • Constructors with arguments
  • Calling a constructor
  • The default constructor
  • Constructor chaining
  • Shared constructors
  • Shared constructor execution
  • Declaring a shared constructor
  • Shared constructor rules

Inheritance

  • Introduction to Inheritance
  • Examples of inheritance use
  • Deriving one class from another
  • Adding to a Derived Class
  • Overriding Members of the Base Class
  • The Object class
  • Preventing the overriding of a member
  • Calling Members of the Base Class
  • Multi-Level Hierarchies
  • The Protected access modifier
  • Constructors and Inheritance
  • Explicitly calling Base Class Constructors
  • Protected Constructors
  • Substituting derived objects for base class objects

Shared members and classes

  • Shared Members of a Class
  • Examples of shared behaviour
  • Declaring Shared Members
  • Referencing Shared Members

Sealed and Abstract classes

  • NotInheritable
  • MustOverride
  • Creating an abstract class
  • Members of an abstract class

Polymorphism and Shadowing

  • Substituting a derived class for its parent
  • Polymorphism
  • Shadowing

Arrays

  • Array Types
  • Declaring an Array Variable
  • Accessing the elements in an array
  • Declaring and populating an array variable
  • Changing the size of an array
  • Retrieving the length of an array
  • Using For Each to loop through an array

Error handling

  • Introduction to Exception Handling
  • Try .. Catch
  • Finally
  • The Exception Class
  • Catching the Exception instance
  • The Exception Message
  • Derived Exception Classes
  • FormatException
  • OverflowException
  • IndexOutOfRangeException
  • DivideByZeroException
  • Catching Multiple Exceptions
  • Exception Nesting
  • Throwing an Exception
  • Passing a message to the Exception class
  • Custom Exceptions
  • Defining Custom Exceptions
  • Throwing custom Exceptions

Enumerators

  • What are Enumerators?
  • When to use Enumerators?
  • Declaring enumerators
  • Enumerators cont.
  • Using enumerators

Namespaces and Modules

  • What is a namespace?
  • Accessing Members of a Namespace
  • Namespace Nesting
  • Importing a Namespace
  • Root namespaces
  • Modules


Availability

Click on a date to book it

Can't see a suitable date or location?
This course is also available as a one on one course or as a private course.
Click here to register your interest in this course and we will keep you informed when any new dates are added.

FAQs

  • What are the course times?
    • Please arrive for a 9.30am start on the first day of your course. Subsequent days will usually start at 9am but check with your instructor. The course will end at 5pm each day.

  • Do I need to bring anything?
    • No, everything is provided, you only have to bring yourself.

  • How can I pay?
    • Once you have booked you will receive a confirmation email, and shortly after that, an invoice. The invoice is payable within 30 days and payment can be made by bank transfer (BACS etc), cheque or card.

  • Is there a dress code?
    • There is no dress code for any of our courses.

  • Are refreshments provided?
    • Mid-morning and mid-afternoon refreshments will be provided. Lunch is not provided but all our venues are in central locations.

  • What is the cancellation policy?
    • Cancellations received within 7 days of making your booking or more than 21 days before the scheduled start date will not incur any charge. For cancellations received between 7 and 21 days before the scheduled start date a 50 percent charge will apply. For cancellations received less than 7 days before the scheduled start date a 100 percent charge will apply.


Other courses