420. Object-Oriented
Programming in VB.NET
Rev. 2.0
.NET is a revolutionary advance in programming technology that
greatly simplifies application development. Microsoft’s popular Visual Basic
programming language has been upgraded to take advantage of the new .NET
features. Visual Basic .NET, or simply VB.NET, has become a full
object-oriented programming language with capabilities comparable to C++, Java,
and Microsoft’s new language C#.
This course is a practical introduction to programming in VB.NET and
the use of services provided by .NET. It emphasizes the VB.NET language and how
to build VB.NET applications from an object-oriented perspective. Previous
knowledge of Visual Basic is not essential. The course is recommended for
programmers using .NET 1.1, providing project files for Visual Studio .NET
2003. It also contains a chapter introducing new features of .NET 2.0, such as
generic types.
One of the strengths of Visual Basic, and the reason it has enjoyed
such widespread use, is the ease with which Windows application can be
developed. Microsoft has revamped the way that Windows applications are built
under .NET. Windows Forms, used by .NET languages, represents a class library
that brings uniformity to the components of a Windows application. The course
includes substantial coverage of using Windows Forms in VB.NET.
The first part of the course covers the fundamentals of Microsoft’s
VB.NET programming language. It starts with a brief chapter, “.NET: What You Need To Know,” which gets you up and
running in the .NET environment with a minimum of fuss. The next five chapters
cover the VB.NET language essentials.
The second part of the course discusses object-oriented programming
in VB.NET. It contains three chapters that focus on developing classes using
VB.NET and then extending them via Visual Basic .NET's inheritance
capabilities. Interface-based programming is also introduced.
The final part of the course introduces the Windows Forms class
library. Programmers familiar with previous versions of VB will notice that
this significantly changes the programming model, yet also introduces
flexibility not previously available. The three chapters in this part evolve
from building simple dialog applications, to the use of menus, status bars, and
toolbars. It includes an introduction to database-driven GUI applications. The
course concludes with an overview of the new VB.NET features provided by .NET
2.0, including example programs to illustrate each important new feature. An
appendix explains the fundamentals of working with the Visual Studio .NET
development environment.
The student will receive a comprehensive set of materials, including
course notes and all the programming examples.
LEARNING OBJECTIVES
·
Gain an understanding of the .NET architecture
·
Gain a working knowledge of the Visual Basic
programming language
·
Learn how to build object-oriented applications
using Visual Basic .NET
·
Learn how to implement Windows desktop applications
using Windows Forms, including programs that interact with databases
·
Gain a working knowledge of generic types and
other new features in VB.NET 2.0.
Course Duration: 5
days
Prerequisites: The
student should have some programming experience.
1.
.NET: What You Need To Know
.NET Executables and the CLR
A .NET Testbed for VB.NET Programming
Visual Studio .NET
2.
Fundamentals of VB.NET Programming
Program Structure
Namespaces
Data Types
Variables
Conversions
Operators and Expressions
Console I/O
3.
Control Structures
If Statement
Select Case Statement
Do/Loop Statement
For/Next Statement
4.
Procedures
Subroutines
Functions
Pass-by-value Versus Pass-by-reference
Access modifiers
Overloading
Optional Parameters
5.
Advanced Data Types
Arrays
Enumerations
Structures
6.
Exception Handling
Error Detection
Exception Handling
7.
Object-Oriented Programming
Object Oriented Concepts
Defining Classes
Methods and Properties
Shared Data and Methods
Constructors
8.
Inheritance
Inheritance
Controlling Base Class Construction
Access Control
Polymorphism
Events
Abstract and Not Inheritable Classes
Type Conversion in Inheritance
9.
Interfaces
Interface Fundamentals
Programming with Interfaces
Using Interfaces at Runtime
Resolving Ambiguities
10. Windows
Forms
Building a Windows Application
Under the Hood of a Windows Application
Common Controls
11. User
Interface Features
Dialog Boxes
Menus
Status Bars
Toolbars
12. Interacting
with Databases Using Windows Forms
ADO.NET
Building Commands and Adapters with Wizards
DataSet
DataGrid
Binding a Control to a DataSet
13. New
Features in VB.NET 2.0
Visual Studio 2005
Partial Classes
Generic Types
Continue Statement
IsNot Operator
Operator Overloading
Properties with Mixed Access Levels
Built-In My Object
Other New Features
Appendix A. Using Visual Studio .NET
Overview of Visual Studio .NET
Creating a Console Application
Project Configurations
Debugging
System Requirements
Course exercises require Microsoft Visual Studio .NET 2003 on
Windows 2000 or XP. See the appropriate course Setup Guide for details.
A good minimal hardware profile for this course would have a Pentium
500-MHz or equivalent CPU, 512 MB of RAM, and at least 4 GB of free disk space
for tools installation and courseware.