vb.net complete
vb.net complete
📌 1. Introduction to VB.NET
🔠 3. Data Types
Type Description
Integer 32-bit whole number
Long 64-bit whole number
Double Double-precision float
Decimal High-precision number
String Text data
Boolean True or False
Char Single character
Date Date and time
➕ 4. Operators
Arithmetic: +, -, *, /, Mod, ^
Comparison: =, <>, >, <, >=, <=
Logical: And, Or, Not, AndAlso, OrElse
Assignment: =, +=, -=, etc.
🔁 5. Control Structures
If-Else:
vb.net
CopyEdit
If x > 10 Then
Console.WriteLine("Greater")
Else
Console.WriteLine("Lesser")
End If
Select Case:
vb.net
CopyEdit
Select Case grade
Case "A"
Console.WriteLine("Excellent")
Case Else
Console.WriteLine("Invalid")
End Select
Loops:
vb.net
CopyEdit
For i = 1 To 10
Console.WriteLine(i)
Next
While x < 10
x += 1
End While
Sub Drive()
Console.WriteLine("Driving " & Make)
End Sub
End Class
Arrays:
vb.net
CopyEdit
Dim arr(2) As Integer
arr(0) = 10
Lists:
vb.net
CopyEdit
Dim names As New List(Of String)
names.Add("John")
Dictionaries:
vb.net
CopyEdit
Dim dict As New Dictionary(Of String, Integer)
dict.Add("Age", 25)
🔌 9. Exception Handling
vb.net
CopyEdit
Try
Dim x = 10 / 0
Catch ex As DivideByZeroException
Console.WriteLine("Cannot divide by zero")
Finally
Console.WriteLine("Always runs")
End Try
🧠 11. Multithreading
vb.net
CopyEdit
Dim t As New Threading.Thread(AddressOf DoWork)
t.Start()
Sub DoWork()
Console.WriteLine("In new thread")
End Sub
vb.net
CopyEdit
Dim nums = {1, 2, 3, 4}
Dim even = From n In nums Where n Mod 2 = 0 Select n
XML Manipulation
Web services consumption
Using Async and Await for asynchronous programming
Would you like a PDF, Word, or PowerPoint version of these notes for download or printing?
4o
Do you like this personality?
Tools