SlideShare a Scribd company logo
1 of 37
Section 4: VB.NET Language Fundamentals ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Section Objectives ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
VB.NET Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],VB.NET statement VB.NET statement
Commenting VB.NET Statements ,[object Object],[object Object],[object Object]
Data Types ,[object Object],[object Object],Intermediate language runtime compilers CTS Execution support, runtime functions Security  functionality Boolean Byte Char Double Int16 Int32 Etc. Garbage collection, stack walker, Code  manager Class loader, memory layout
Value Types ,[object Object],[object Object],[object Object],[object Object],i  = 4 Dim i as Integer = 4
Reference Types ,[object Object],[object Object],[object Object],[object Object],name “ Hello” Dim name as String = “Hello”
Data Types in VB.NET Reference types Value types Object String Array Foo(4) Class Foo Short Char Float Long Integer Byte Boolean Double Enum Enum Foo Structure  Foo
Operators in .NET ,[object Object],[object Object],[object Object]
Arithmetic and Assignment Operators Exponentiation assignment ^= Equality = Modulo division Mod Exponentiation ^ Integer division Floating-point division / Multiplication * Subtraction - Addition + Operation Operator Concatenation and assignment &= Integer division assignment  Floating-point division assignment /= Subtraction assignment -= Multiplication assignment *= Addition assignment += Operation Operator
Comparison Operators And And String concatenation + Concatenation & Tests to see if obj1 and obj2 refer to same object Is Compares string to pattern Like Greater than or equal to >= Less than or equal to <= Greater than > Operation Operator Or Or Inequality <> Negative for booleans Not Returns the type of an object GetType Returns address of a given procedure AddressOf Xor (bitwise operations) Xor Less Than < Operation Operator
Demonstration ,[object Object],[object Object]
Declaring and Assigning Variables ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Variable Scope and Visibility ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Understanding Scope ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Scope global to class Scope local to function
Function vs. Block Scope ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Scope local to function Scope local to looping block
Declaring Constants ,[object Object],[object Object],[object Object],[object Object],[object Object]
Static Variable Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],CustomerTotal stays in memory even after the Total() function is exited.
Converting Between Types ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Preventing Implicit Conversions: Option Strict ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],With Option Strict on, the compiler will catch this potential problem. This may cause loss of data.
Arrays in VB.NET ,[object Object],[object Object],Widget Widget Widget Array of widgets
Declaring Arrays ,[object Object],[object Object],A(0)  1 A(1)  2 A(2)  3 A Dim S() as String = {“Hi”,”There”,”Class”} S(0)  S(1)  S(2) S “ Hi” “ There” “ Class”
Redimensioning Arrays ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Conditional Statements ,[object Object],[object Object],[object Object],[object Object]
If Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Select Case Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Looping Statements ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
For…Next Loops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Step 1 is the default.
For…Each Loops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Do…While and Do…Until Loops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Loop while the condition is true. Loop until the condition is true.
While Loops ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Demonstration ,[object Object]
Summary ,[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Section Review
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Section Review
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Section Review
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Section Review

More Related Content

Viewers also liked

VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
Prashanth Shivakumar
 
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
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
ilakkiya
 
Vb.net session 03
Vb.net session 03Vb.net session 03
Vb.net session 03
Niit Care
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
pbarasia
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
simran153
 
Chapter 5.0
Chapter 5.0Chapter 5.0
Chapter 5.0
sotlsoc
 

Viewers also liked (17)

File handling in vb.net
File handling in vb.netFile handling in vb.net
File handling in vb.net
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
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
 
Part17 radio button using vb.net 2012
Part17 radio button using vb.net 2012Part17 radio button using vb.net 2012
Part17 radio button using vb.net 2012
 
Vb.net (loop structure)
Vb.net (loop structure)Vb.net (loop structure)
Vb.net (loop structure)
 
Arrays
ArraysArrays
Arrays
 
Decision statements in vb.net
Decision statements in vb.netDecision statements in vb.net
Decision statements in vb.net
 
Vb.net session 03
Vb.net session 03Vb.net session 03
Vb.net session 03
 
Best practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.netBest practices for upgrading vb 6.0 projects to vb.net
Best practices for upgrading vb 6.0 projects to vb.net
 
Vb.Net Web Forms
Vb.Net  Web FormsVb.Net  Web Forms
Vb.Net Web Forms
 
Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming Chapter 1 — Introduction to Visual Basic 2010 Programming
Chapter 1 — Introduction to Visual Basic 2010 Programming
 
Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)Presentation on visual basic 6 (vb6)
Presentation on visual basic 6 (vb6)
 
Visual Basic Controls ppt
Visual Basic Controls pptVisual Basic Controls ppt
Visual Basic Controls ppt
 
Visual basic ppt for tutorials computer
Visual basic ppt for tutorials computerVisual basic ppt for tutorials computer
Visual basic ppt for tutorials computer
 
Chapter 5.0
Chapter 5.0Chapter 5.0
Chapter 5.0
 
Vb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary UploadVb.Net 01 To 03 Summary Upload
Vb.Net 01 To 03 Summary Upload
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICA
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

VB.NET Language Fundamentals

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. Data Types in VB.NET Reference types Value types Object String Array Foo(4) Class Foo Short Char Float Long Integer Byte Boolean Double Enum Enum Foo Structure Foo
  • 9.
  • 10. Arithmetic and Assignment Operators Exponentiation assignment ^= Equality = Modulo division Mod Exponentiation ^ Integer division Floating-point division / Multiplication * Subtraction - Addition + Operation Operator Concatenation and assignment &= Integer division assignment Floating-point division assignment /= Subtraction assignment -= Multiplication assignment *= Addition assignment += Operation Operator
  • 11. Comparison Operators And And String concatenation + Concatenation & Tests to see if obj1 and obj2 refer to same object Is Compares string to pattern Like Greater than or equal to >= Less than or equal to <= Greater than > Operation Operator Or Or Inequality <> Negative for booleans Not Returns the type of an object GetType Returns address of a given procedure AddressOf Xor (bitwise operations) Xor Less Than < Operation Operator
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.