SlideShare a Scribd company logo
introduction to
visual basic.net
Patrick Oliveros
Microsoft MVP ASP.NET/IIS
Setting Expectations
▪ Schedule
– 5 Saturdays. 9am - 5pm
▪ Course Requirements
– Daily Exercises
– Midterm Exercise (Day 3)
– Final Exercise (Day 5)
▪ House Rules
– do not hesitate to ask! you are here to learn.
– majority of the things are demo driven, hence less slides!
– do not take calls inside the room. you can take it outside if you need to
take it badly.
– be creative! there are different ways to solve a problem.
– submit requirements to patfreak@outlook.ph
Agenda Overview
▪ Introduction to .NET
▪ Understanding Visual Basic .NET Language
▪ Data Access with .NET
▪ Building Applications
▪ Application Deployment
▪ Future Learning
Hello!
▪ Name
▪ Background
▪ Expectations from the class
Agenda Day 1
▪ Introduction to .NET
– What is .NET?
– Why .NET?
– What you can do with .NET?
▪ Introduction to .NET (Continued)
– Getting familiar with Visual Studio
– Creating your new project
▪ Understanding Visual Basic .NET Language
– Fundamentals
▪ Exercise for the Day
Microsoft .NET Framework
Common Language Runtime (CLR)
Class Libraries
CLR Features
Class Loader
IL to Native
Compilers
Code
Manager
Garbage
Collector
Security Engine Debug Engine
Type Checker Exception Manager
Thread Support COM Marshaler
Base Class Library Support
Compilation
Before installation
or the first time
each method is
called
Execution
JIT CompilerNative
Code
MSIL
Code
Metadata
Source
Code
Language
Compiler
CLR and Execution
Other .NET
Language
C# VB.NET C++
Compilation
Operating System
Common Language Runtime
Base Class Library
Other Libraries
ASP.NET,Windows Forms, ADO.NET, XML
Framework
Class
Library
(FCL)
.NET
Framework
Execution
.NET Program .NET Library
The Bigger Picture
▪ contains common classes used by all .NET
languages
–Basic data types: int, string, DateTime
–I/O, processes
–Non-.NET Code interoperability
–Others
Base Class Library
Base Class Libraries
▪ BCL plus more useful libraries, also known as
Application Framework Class Libraries
–ASP.NET – Web dev, Web services
–ADO.NET – Data access
–Windows Forms – Windows applications
–XML, others,etc.
Base Class Library
Framework
Class
Library
(FCL)
Other Libraries
ASP.NET,Windows Forms, ADO.NET, XML
Framework Class Libraries
▪ Declare utilization by “Imports” keyword
Imports System
▪ Use fully qualified namespaces
▪ Common FCLS:
–System
–System.Data
–System.IO
–System.Web
Using FCLs
▪ Logical organization
– Code organized in hierarchical namespaces and classes
▪ Unified type system
– Everything is an object, no variants, one string type, all character data is
Unicode
▪ Common design patterns throughout
– Collections, components, events
▪ Object system is built in to CLR, not bolted on
– No additional rules or API to learn
– Everything is derived from “System.Object”
▪ Enables clean OO programming
– Classes and Interfaces, full polymorphism
– Properties, methods, events
– Implementation inheritance
FCL Benefits
demo
let’s create your first program!
▪ Used to repeat statements in a logical
manner
–For Loop
–For Each
–While
–Do While
–Do Until
Loops
▪ Repeats through a range of values
' This is the structure of a For Loop
For <variable> As <type> = <bound From> To <bound
To>
' Do something
Next
Loops – For Loop
▪ This example uses the bound from 0 and bound to 10 in the For Loop statement. Please
remember that the two bounds are inclusive. This means all the numbers in the range,
including 0 and 10, will be reached.
▪ Counter variable is increasing
' This loop goes from 0 to 10.
For value As Integer = 0 To 10
' Exit condition if the value is three.
DoSomething(value)
Next
Loops – For Loop
▪ This example uses the bound from 100 to bound to 10 in the For-loop statement,
decreasing by 10.
▪ Counter variable is decreasing
' This loop goes from 100 to 10.
For value As Integer = 100 To 10 Step -10
' Exit condition if the value is three.
DoSomething(value)
Next
Loops – For Loop
▪ This example uses the nested For Loop
For row As Integer = 0 To 2
For column As Integer = 0 To 2
Console.WriteLine("{0},{1}", row, column)
Next
Next
Loops – For Loop
▪ One of the clearest loop constructs
▪ In the example below, type should match collection type
' This is the structure of a For Each Loop
For Each <variable> As <type> In <TypeCollection>
' Do something
Next
Loops – For Each Loop
Dim Colleges() As String = {“Engineering",
“Architecture", _
“Arts and Sciences", “Medicine"}
' Loop over each element with For Each.
For Each college As String In Colleges
Console.WriteLine(college)
Next
Loops – For Each Loop
Dim Colleges() As String = {“Engineering",
“Architecture", _
“Arts and Sciences", “Medicine"}
' Loop over each element with For
For index As Integer = 0 To Colleges.Length - 1
Console.WriteLine(Colleges(college))
Next
Loops – For Each vs For Loop
Summary – For vs For Each Loop
▪ The For-loop is a core looping construct in the VB.NET language. It
provides a way to explicitly specify the loop bounds. And thus it often
leads to more robust code.
▪ With the for-keyword, fewer careless bugs may occur. Boundaries are
clear, well-defined. Errors are often caused by incorrect loop
boundaries.
▪ By providing the For-Each looping construct, the VB.NET language
simplifies many loops. For-Each loop can reduce bugs in the source
code that might occur due to mismanagement of loop bounds in a
For-loop or other kind of loop.
▪ When possible, it is advisable to employ the For-Each loop for this
reason.
▪ Execute while condition/s is/are true
▪ Stops when condition becomes false
While <condition/s>
' Do something
' Control Condition
End While
Loops – While
▪ Loop continues until i becomes 100.
▪ i is incremented by 10s
Dim i As Integer = 0
While i < 100
' DoSomething(i)
i += 10
End While
Loops – While
▪ Loop continues until v is less than 100 and b > 3.
▪ v is incremented by 10s, b is decremented by 1
Dim v As Integer = 0
Dim b As Integer = 5
While v < 100 AndAlso b > 3
' DoSomething(v)
v += 10
b -= 1
End While
Loops – While (multiple conditions)
▪ Execute loop until condition/s is/are false
▪ Condition should be satisfied first
▪ Option for those who are used with C/C++/C#
Do While <condition/s>
' Do something
' Control Condition
Loop
Loops – Do While
▪ Loop continues until i becomes 100.
▪ i is incremented by 10s
Dim i As Integer = 0
Do While i < 100
' DoSomething(i)
i += 10
Loop
Loops – Do While
▪ Loop continues until v is less than 100 and b > 3.
▪ v is incremented by 10s, b is decremented by 1
Dim v As Integer = 0
Dim b As Integer = 5
Do While v < 100 AndAlso b > 3
' DoSomething(v)
v += 10
b -= 1
Loop
Loops – Do While (multiple conditions)
▪ Same with Do-While, only inversion of condition
▪ Conceptually means “Do-While-Not” syntax
Do Until <condition/s>
' Do something
' Control Condition
Loop
Loops – Do Until
▪ Loop continues until i becomes 100.
▪ i is incremented by 10s
Dim i As Integer = 0
Do Until i < 100
' DoSomething(i)
i -= 10
Loop
Loops – Do Until
Summary – While vs Do While/Until
▪ Be careful with conditions as it may lead to infinite loop. See
Do-While vs Do-Until. It is possible (and common) to use a
termination condition that will never be reached.
▪ The Do-While and Do-Until end with the Loop statement. The
While construct ends with the End While statement.
▪ While-loop construct has a clear syntactic form. The repetition
of the While keyword in the End While statement makes it easier
to read and understand. Other than its syntactic form, it is
equivalent to the Do While construct.
demo
loops
Summary – Day 1
▪ What, why .NET framework
▪ Encounter with Visual Studio
▪ Learning Visual Basic .NET Fundamentals
▪ Creating your first program
Agenda Day 2
▪ Understanding Visual Basic .NET Language
– Advanced
▪ ADO.NET
▪ Exercise for the Day
exercise
let’s test your knowledge

More Related Content

What's hot

Python loops
Python loopsPython loops
170120107074 looping statements and nesting of loop statements
170120107074 looping statements and nesting of loop statements170120107074 looping statements and nesting of loop statements
170120107074 looping statements and nesting of loop statements
harsh kothari
 
Do...until loop structure
Do...until loop structureDo...until loop structure
Do...until loop structure
Jd Mercado
 
Loops in c
Loops in cLoops in c
types of loops and what is loop
types of loops and what is looptypes of loops and what is loop
types of loops and what is loop
waheed dogar
 
Presentation1
Presentation1Presentation1
Presentation1
kartik sopran
 
While , For , Do-While Loop
While , For , Do-While LoopWhile , For , Do-While Loop
While , For , Do-While Loop
Abhishek Choksi
 
Break and continue
Break and continueBreak and continue
Break and continue
Frijo Francis
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
Gagan Deep
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
Md. Arif Hossain
 
3.looping(iteration statements)
3.looping(iteration statements)3.looping(iteration statements)
3.looping(iteration statements)
Hardik gupta
 
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopLoops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Priyom Majumder
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
Jeya Lakshmi
 
Loops in c language
Loops in c languageLoops in c language
Loops in c language
tanmaymodi4
 
Loops
LoopsLoops
Java Programming: Loops
Java Programming: LoopsJava Programming: Loops
Java Programming: Loops
Karwan Mustafa Kareem
 
Loops
LoopsLoops
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition Presentation
Badrul Alam
 
Looping
LoopingLooping
Looping in C
Looping in CLooping in C
Looping in C
Prabhu Govind
 

What's hot (20)

Python loops
Python loopsPython loops
Python loops
 
170120107074 looping statements and nesting of loop statements
170120107074 looping statements and nesting of loop statements170120107074 looping statements and nesting of loop statements
170120107074 looping statements and nesting of loop statements
 
Do...until loop structure
Do...until loop structureDo...until loop structure
Do...until loop structure
 
Loops in c
Loops in cLoops in c
Loops in c
 
types of loops and what is loop
types of loops and what is looptypes of loops and what is loop
types of loops and what is loop
 
Presentation1
Presentation1Presentation1
Presentation1
 
While , For , Do-While Loop
While , For , Do-While LoopWhile , For , Do-While Loop
While , For , Do-While Loop
 
Break and continue
Break and continueBreak and continue
Break and continue
 
C lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshareC lecture 4 nested loops and jumping statements slideshare
C lecture 4 nested loops and jumping statements slideshare
 
Different loops in C
Different loops in CDifferent loops in C
Different loops in C
 
3.looping(iteration statements)
3.looping(iteration statements)3.looping(iteration statements)
3.looping(iteration statements)
 
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested LoopLoops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
Loops in C Programming | for Loop | do-while Loop | while Loop | Nested Loop
 
Looping statements in C
Looping statements in CLooping statements in C
Looping statements in C
 
Loops in c language
Loops in c languageLoops in c language
Loops in c language
 
Loops
LoopsLoops
Loops
 
Java Programming: Loops
Java Programming: LoopsJava Programming: Loops
Java Programming: Loops
 
Loops
LoopsLoops
Loops
 
Loop(for, while, do while) condition Presentation
Loop(for, while, do while) condition PresentationLoop(for, while, do while) condition Presentation
Loop(for, while, do while) condition Presentation
 
Looping
LoopingLooping
Looping
 
Looping in C
Looping in CLooping in C
Looping in C
 

Viewers also liked

File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.net
Everywhere
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
salonityagi
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
ilakkiya
 
Database Operation di VB.NET
Database Operation di VB.NETDatabase Operation di VB.NET
Database Operation di VB.NET
FgroupIndonesia
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
Roger Argarin
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
Shyam Sir
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
Arun Prasad
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
simran153
 
College management system ppt
College management system pptCollege management system ppt
College management system ppt
Shanthan Reddy
 
Advanced VB: Object Oriented Programming - Controls
Advanced VB: Object Oriented Programming - ControlsAdvanced VB: Object Oriented Programming - Controls
Advanced VB: Object Oriented Programming - Controls
robertbenard
 
Chapter 5.0
Chapter 5.0Chapter 5.0
Chapter 5.0
sotlsoc
 
Assignement code
Assignement codeAssignement code
Assignement code
Syed Umair
 
Chapter 5.3
Chapter 5.3Chapter 5.3
Chapter 5.3
sotlsoc
 
Ppt lesson 10
Ppt lesson 10Ppt lesson 10
Ppt lesson 10
Linda Bodrie
 
Select case
Select caseSelect case
Select case
kuldeep94
 
Ppt lesson 11
Ppt lesson 11Ppt lesson 11
Ppt lesson 11
Linda Bodrie
 
Nested loop
Nested loopNested loop
Nested loop
Lal Bdr. Saud
 
REPORT ON ASP.NET
REPORT ON ASP.NETREPORT ON ASP.NET
REPORT ON ASP.NET
LOKESH
 
Online notice board
Online notice boardOnline notice board
Online notice board
Deepak Upadhyay
 
Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core
John Patrick Oliveros
 

Viewers also liked (20)

File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.net
 
Visual Studio.NET
Visual Studio.NETVisual Studio.NET
Visual Studio.NET
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
 
Database Operation di VB.NET
Database Operation di VB.NETDatabase Operation di VB.NET
Database Operation di VB.NET
 
Introduction to visual basic programming
Introduction to visual basic programmingIntroduction to visual basic programming
Introduction to visual basic programming
 
Operators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NETOperators , Functions and Options in VB.NET
Operators , Functions and Options in VB.NET
 
Introduction to .net framework
Introduction to .net frameworkIntroduction to .net framework
Introduction to .net framework
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
College management system ppt
College management system pptCollege management system ppt
College management system ppt
 
Advanced VB: Object Oriented Programming - Controls
Advanced VB: Object Oriented Programming - ControlsAdvanced VB: Object Oriented Programming - Controls
Advanced VB: Object Oriented Programming - Controls
 
Chapter 5.0
Chapter 5.0Chapter 5.0
Chapter 5.0
 
Assignement code
Assignement codeAssignement code
Assignement code
 
Chapter 5.3
Chapter 5.3Chapter 5.3
Chapter 5.3
 
Ppt lesson 10
Ppt lesson 10Ppt lesson 10
Ppt lesson 10
 
Select case
Select caseSelect case
Select case
 
Ppt lesson 11
Ppt lesson 11Ppt lesson 11
Ppt lesson 11
 
Nested loop
Nested loopNested loop
Nested loop
 
REPORT ON ASP.NET
REPORT ON ASP.NETREPORT ON ASP.NET
REPORT ON ASP.NET
 
Online notice board
Online notice boardOnline notice board
Online notice board
 
Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core Moving ASP.NET MVC to ASP.NET Core
Moving ASP.NET MVC to ASP.NET Core
 

Similar to Introduction to VB.NET - UP SITF

while and for Loops
while and for Loopswhile and for Loops
while and for Loops
Ray0uni
 
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan s.r.o.
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
Hawkman Academy
 
c++ Data Types and Selection
c++ Data Types and Selectionc++ Data Types and Selection
c++ Data Types and Selection
Ahmed Nobi
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbook
guestae36d0
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
Tushar Pal
 
From Java to Parellel Clojure - Clojure South 2019
From Java to Parellel Clojure - Clojure South 2019From Java to Parellel Clojure - Clojure South 2019
From Java to Parellel Clojure - Clojure South 2019
Leonardo Borges
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
Hesham Shabana
 
Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and looping
aprilyyy
 
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
Harshal Hayatnagarkar
 
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Lucidworks
 
Switch case and looping jam
Switch case and looping jamSwitch case and looping jam
Switch case and looping jam
JamaicaAubreyUnite
 
Loop
LoopLoop
Brixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 RecapBrixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 Recap
Basil Bibi
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kim
kimberly_Bm10203
 
C loops
C loopsC loops
C loops
sunilchute1
 
Lec7 - Loops updated.pptx
Lec7 - Loops updated.pptxLec7 - Loops updated.pptx
Lec7 - Loops updated.pptx
NaumanRasheed11
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
C4Media
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.
gerrell
 
While and For Loops
While and For LoopsWhile and For Loops
While and For Loops
باسل قدح
 

Similar to Introduction to VB.NET - UP SITF (20)

while and for Loops
while and for Loopswhile and for Loops
while and for Loops
 
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
eMan Dev Meetup: Kotlin - A Language we should know it exists (part 02/03) 18...
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
c++ Data Types and Selection
c++ Data Types and Selectionc++ Data Types and Selection
c++ Data Types and Selection
 
U C2007 My S Q L Performance Cookbook
U C2007  My S Q L  Performance  CookbookU C2007  My S Q L  Performance  Cookbook
U C2007 My S Q L Performance Cookbook
 
Ruby basics
Ruby basicsRuby basics
Ruby basics
 
From Java to Parellel Clojure - Clojure South 2019
From Java to Parellel Clojure - Clojure South 2019From Java to Parellel Clojure - Clojure South 2019
From Java to Parellel Clojure - Clojure South 2019
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
Switch case and looping
Switch case and loopingSwitch case and looping
Switch case and looping
 
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
DSL Construction with Ruby - ThoughtWorks Masterclass Series 2009
 
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
Rebuilding Solr 6 Examples - Layer by Layer: Presented by Alexandre Rafalovit...
 
Switch case and looping jam
Switch case and looping jamSwitch case and looping jam
Switch case and looping jam
 
Loop
LoopLoop
Loop
 
Brixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 RecapBrixton Library Technology Initiative Week1 Recap
Brixton Library Technology Initiative Week1 Recap
 
Switch case and looping kim
Switch case and looping kimSwitch case and looping kim
Switch case and looping kim
 
C loops
C loopsC loops
C loops
 
Lec7 - Loops updated.pptx
Lec7 - Loops updated.pptxLec7 - Loops updated.pptx
Lec7 - Loops updated.pptx
 
Rust's Journey to Async/await
Rust's Journey to Async/awaitRust's Journey to Async/await
Rust's Journey to Async/await
 
Macasu, gerrell c.
Macasu, gerrell c.Macasu, gerrell c.
Macasu, gerrell c.
 
While and For Loops
While and For LoopsWhile and For Loops
While and For Loops
 

Recently uploaded

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
RAHUL
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
Priyankaranawat4
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
National Information Standards Organization (NISO)
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
History of Stoke Newington
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
AyyanKhan40
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Dr. Vinod Kumar Kanvaria
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
WaniBasim
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
sayalidalavi006
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
adhitya5119
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
simonomuemu
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
David Douglas School District
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
eBook.com.bd (প্রয়োজনীয় বাংলা বই)
 

Recently uploaded (20)

LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UPLAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
LAND USE LAND COVER AND NDVI OF MIRZAPUR DISTRICT, UP
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
clinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdfclinical examination of hip joint (1).pdf
clinical examination of hip joint (1).pdf
 
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
Pollock and Snow "DEIA in the Scholarly Landscape, Session One: Setting Expec...
 
The History of Stoke Newington Street Names
The History of Stoke Newington Street NamesThe History of Stoke Newington Street Names
The History of Stoke Newington Street Names
 
PIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf IslamabadPIMS Job Advertisement 2024.pdf Islamabad
PIMS Job Advertisement 2024.pdf Islamabad
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
Exploiting Artificial Intelligence for Empowering Researchers and Faculty, In...
 
Liberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdfLiberal Approach to the Study of Indian Politics.pdf
Liberal Approach to the Study of Indian Politics.pdf
 
Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5Community pharmacy- Social and preventive pharmacy UNIT 5
Community pharmacy- Social and preventive pharmacy UNIT 5
 
Main Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docxMain Java[All of the Base Concepts}.docx
Main Java[All of the Base Concepts}.docx
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Smart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICTSmart-Money for SMC traders good time and ICT
Smart-Money for SMC traders good time and ICT
 
Pride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School DistrictPride Month Slides 2024 David Douglas School District
Pride Month Slides 2024 David Douglas School District
 
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdfবাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
বাংলাদেশ অর্থনৈতিক সমীক্ষা (Economic Review) ২০২৪ UJS App.pdf
 

Introduction to VB.NET - UP SITF

  • 1. introduction to visual basic.net Patrick Oliveros Microsoft MVP ASP.NET/IIS
  • 2. Setting Expectations ▪ Schedule – 5 Saturdays. 9am - 5pm ▪ Course Requirements – Daily Exercises – Midterm Exercise (Day 3) – Final Exercise (Day 5) ▪ House Rules – do not hesitate to ask! you are here to learn. – majority of the things are demo driven, hence less slides! – do not take calls inside the room. you can take it outside if you need to take it badly. – be creative! there are different ways to solve a problem. – submit requirements to patfreak@outlook.ph
  • 3. Agenda Overview ▪ Introduction to .NET ▪ Understanding Visual Basic .NET Language ▪ Data Access with .NET ▪ Building Applications ▪ Application Deployment ▪ Future Learning
  • 4. Hello! ▪ Name ▪ Background ▪ Expectations from the class
  • 5. Agenda Day 1 ▪ Introduction to .NET – What is .NET? – Why .NET? – What you can do with .NET? ▪ Introduction to .NET (Continued) – Getting familiar with Visual Studio – Creating your new project ▪ Understanding Visual Basic .NET Language – Fundamentals ▪ Exercise for the Day
  • 6.
  • 7. Microsoft .NET Framework Common Language Runtime (CLR) Class Libraries
  • 8. CLR Features Class Loader IL to Native Compilers Code Manager Garbage Collector Security Engine Debug Engine Type Checker Exception Manager Thread Support COM Marshaler Base Class Library Support
  • 9. Compilation Before installation or the first time each method is called Execution JIT CompilerNative Code MSIL Code Metadata Source Code Language Compiler CLR and Execution
  • 10. Other .NET Language C# VB.NET C++ Compilation Operating System Common Language Runtime Base Class Library Other Libraries ASP.NET,Windows Forms, ADO.NET, XML Framework Class Library (FCL) .NET Framework Execution .NET Program .NET Library The Bigger Picture
  • 11. ▪ contains common classes used by all .NET languages –Basic data types: int, string, DateTime –I/O, processes –Non-.NET Code interoperability –Others Base Class Library Base Class Libraries
  • 12. ▪ BCL plus more useful libraries, also known as Application Framework Class Libraries –ASP.NET – Web dev, Web services –ADO.NET – Data access –Windows Forms – Windows applications –XML, others,etc. Base Class Library Framework Class Library (FCL) Other Libraries ASP.NET,Windows Forms, ADO.NET, XML Framework Class Libraries
  • 13. ▪ Declare utilization by “Imports” keyword Imports System ▪ Use fully qualified namespaces ▪ Common FCLS: –System –System.Data –System.IO –System.Web Using FCLs
  • 14. ▪ Logical organization – Code organized in hierarchical namespaces and classes ▪ Unified type system – Everything is an object, no variants, one string type, all character data is Unicode ▪ Common design patterns throughout – Collections, components, events ▪ Object system is built in to CLR, not bolted on – No additional rules or API to learn – Everything is derived from “System.Object” ▪ Enables clean OO programming – Classes and Interfaces, full polymorphism – Properties, methods, events – Implementation inheritance FCL Benefits
  • 15. demo let’s create your first program!
  • 16. ▪ Used to repeat statements in a logical manner –For Loop –For Each –While –Do While –Do Until Loops
  • 17. ▪ Repeats through a range of values ' This is the structure of a For Loop For <variable> As <type> = <bound From> To <bound To> ' Do something Next Loops – For Loop
  • 18. ▪ This example uses the bound from 0 and bound to 10 in the For Loop statement. Please remember that the two bounds are inclusive. This means all the numbers in the range, including 0 and 10, will be reached. ▪ Counter variable is increasing ' This loop goes from 0 to 10. For value As Integer = 0 To 10 ' Exit condition if the value is three. DoSomething(value) Next Loops – For Loop
  • 19. ▪ This example uses the bound from 100 to bound to 10 in the For-loop statement, decreasing by 10. ▪ Counter variable is decreasing ' This loop goes from 100 to 10. For value As Integer = 100 To 10 Step -10 ' Exit condition if the value is three. DoSomething(value) Next Loops – For Loop
  • 20. ▪ This example uses the nested For Loop For row As Integer = 0 To 2 For column As Integer = 0 To 2 Console.WriteLine("{0},{1}", row, column) Next Next Loops – For Loop
  • 21. ▪ One of the clearest loop constructs ▪ In the example below, type should match collection type ' This is the structure of a For Each Loop For Each <variable> As <type> In <TypeCollection> ' Do something Next Loops – For Each Loop
  • 22. Dim Colleges() As String = {“Engineering", “Architecture", _ “Arts and Sciences", “Medicine"} ' Loop over each element with For Each. For Each college As String In Colleges Console.WriteLine(college) Next Loops – For Each Loop
  • 23. Dim Colleges() As String = {“Engineering", “Architecture", _ “Arts and Sciences", “Medicine"} ' Loop over each element with For For index As Integer = 0 To Colleges.Length - 1 Console.WriteLine(Colleges(college)) Next Loops – For Each vs For Loop
  • 24. Summary – For vs For Each Loop ▪ The For-loop is a core looping construct in the VB.NET language. It provides a way to explicitly specify the loop bounds. And thus it often leads to more robust code. ▪ With the for-keyword, fewer careless bugs may occur. Boundaries are clear, well-defined. Errors are often caused by incorrect loop boundaries. ▪ By providing the For-Each looping construct, the VB.NET language simplifies many loops. For-Each loop can reduce bugs in the source code that might occur due to mismanagement of loop bounds in a For-loop or other kind of loop. ▪ When possible, it is advisable to employ the For-Each loop for this reason.
  • 25. ▪ Execute while condition/s is/are true ▪ Stops when condition becomes false While <condition/s> ' Do something ' Control Condition End While Loops – While
  • 26. ▪ Loop continues until i becomes 100. ▪ i is incremented by 10s Dim i As Integer = 0 While i < 100 ' DoSomething(i) i += 10 End While Loops – While
  • 27. ▪ Loop continues until v is less than 100 and b > 3. ▪ v is incremented by 10s, b is decremented by 1 Dim v As Integer = 0 Dim b As Integer = 5 While v < 100 AndAlso b > 3 ' DoSomething(v) v += 10 b -= 1 End While Loops – While (multiple conditions)
  • 28. ▪ Execute loop until condition/s is/are false ▪ Condition should be satisfied first ▪ Option for those who are used with C/C++/C# Do While <condition/s> ' Do something ' Control Condition Loop Loops – Do While
  • 29. ▪ Loop continues until i becomes 100. ▪ i is incremented by 10s Dim i As Integer = 0 Do While i < 100 ' DoSomething(i) i += 10 Loop Loops – Do While
  • 30. ▪ Loop continues until v is less than 100 and b > 3. ▪ v is incremented by 10s, b is decremented by 1 Dim v As Integer = 0 Dim b As Integer = 5 Do While v < 100 AndAlso b > 3 ' DoSomething(v) v += 10 b -= 1 Loop Loops – Do While (multiple conditions)
  • 31. ▪ Same with Do-While, only inversion of condition ▪ Conceptually means “Do-While-Not” syntax Do Until <condition/s> ' Do something ' Control Condition Loop Loops – Do Until
  • 32. ▪ Loop continues until i becomes 100. ▪ i is incremented by 10s Dim i As Integer = 0 Do Until i < 100 ' DoSomething(i) i -= 10 Loop Loops – Do Until
  • 33. Summary – While vs Do While/Until ▪ Be careful with conditions as it may lead to infinite loop. See Do-While vs Do-Until. It is possible (and common) to use a termination condition that will never be reached. ▪ The Do-While and Do-Until end with the Loop statement. The While construct ends with the End While statement. ▪ While-loop construct has a clear syntactic form. The repetition of the While keyword in the End While statement makes it easier to read and understand. Other than its syntactic form, it is equivalent to the Do While construct.
  • 35. Summary – Day 1 ▪ What, why .NET framework ▪ Encounter with Visual Studio ▪ Learning Visual Basic .NET Fundamentals ▪ Creating your first program
  • 36. Agenda Day 2 ▪ Understanding Visual Basic .NET Language – Advanced ▪ ADO.NET ▪ Exercise for the Day

Editor's Notes

  1. The Microsoft .NET framework is one of the powerful technologies available today for creating cross platform applications. These includes the desktop, web, mobile, and applications not even native to Microsoft (e.g. Android, iOS through Xamarin). It consists of several programming languages such as C#, Visual Basic, C++ and application frameworks such as ASP.NET (for the web), Windows Phone, and Windows Presentation Foundation (WPF) for the desktop. 1.0/1.1/2.0/3.0/3.5/4.0/4.5/4.6
  2. The two main components of the .NET Framework are the following: - Common Language Runtime and Class Libraries. Class libraries include both base class libraries and framework class libraries.
  3. Module 04: Introduction to the .NET Languages
  4. Module 04: Introduction to the .NET Languages