Visual Basic 2005 By Sam Nasr November 6,
Agenda Introduction Introduction New Features New Features Demo Demo Q&A Q&A Survey Survey
What is VB.Net? VB.Net is the latest release of Microsofts Visual Basic language. VB.Net is the latest release of Microsofts Visual Basic language. VB is an event driven programming language. VB is an event driven programming language. Derived heavily from BASIC. Derived heavily from BASIC. VB enables Rapid Application Development (RAD) of graphical user interface (GUI) applications. VB enables Rapid Application Development (RAD) of graphical user interface (GUI) applications.
New Features My Namespace My Namespace Operator Overloading Operator Overloading Generics Generics Keywords Keywords IsNotIsNot UsingUsing Continue {For | While | Do}Continue {For | While | Do} Unsigned Integer Types Unsigned Integer Types Partial Classes Partial Classes Background Worker Object Background Worker Object
My Namespace Single reference for multiple pieces of information. Single reference for multiple pieces of information. Classes: Classes: 1.Application 2.Computer 3.Forms 4.Resources 5.Settings 6.User
Operator Overloading Dynamically created at compile time Dynamically created at compile time Compiler locates the correct function. Compiler locates the correct function. No special coding required. No special coding required.
Demo
Generics Utilizes System.Collections.Generic Utilizes System.Collections.Generic Allow classes, structs, interfaces, and methods to be parameterized Allow classes, structs, interfaces, and methods to be parameterized Provides strong typing Provides strong typing
Features IsNot Keyword IsNot Keyword Replaces If not (obj is Nothing) Then …Replaces If not (obj is Nothing) Then … Using Keyword Using Keyword Creates a block of code to limit scopeCreates a block of code to limit scope Numeric Types Numeric Types
Continue Keyword For i As Integer = 0 To 10 While True While True If someCondition Then If someCondition Then Continue While Continue While ElseIf someOtherCondition Then ElseIf someOtherCondition Then Continue For Continue For End If End If Do Do If someCondition Then If someCondition Then Continue Do Continue Do ElseIf someOtherCondition Then ElseIf someOtherCondition Then Continue While Continue While Else Else Continue For Continue For End If End If Loop While someOtherCondition Loop While someOtherCondition End While End While If someCondition Then If someCondition Then Continue For Continue For End If End IfNext
Demo
Partial Classes Allow a single class to be split into multiple files. Allow a single class to be split into multiple files. Generate code in a different file Generate code in a different file Provide functionality in same class. Provide functionality in same class.
Background Worker Object Tool box control Tool box control Placed in Component Tray Placed in Component Tray RunWorkerAsync() RunWorkerAsync() DoWork()DoWork() RunWorkerComplete()RunWorkerComplete()
Demo
Resources Visual Basic Developer Center Visual Basic Developer Center New VB 2005 Features New VB 2005 Features My Feature My Feature Document Your Code Document Your Code