Appendices: Projects, Review Questions, Cheat Sheet & Resources

Capstone projects, interview and review questions, a VB.NET cheat sheet, VB.NET vs C# vs VBA vs VB6, and resources.

Appendix A: Capstone Projects

Beginner: Console Calculator and Unit Converter. Menus with Select Case, input validation with TryParse, functions, and loops.

Beginner: Student Grade Manager. Arrays/Lists, structures, averages and letter grades, file save/load (CSV).

Intermediate: WinForms Contact Manager. CRUD with a DataGridView, data binding, validation with ErrorProvider, SQLite or JSON storage, search/filter with LINQ.

Intermediate: Inventory and Billing System. OOP (Product, Customer, Invoice classes), inheritance and interfaces, ADO.NET with SQL Server, invoice printing (PrintDocument), reports.

Intermediate: Expense Tracker (WPF + MVVM). ObservableCollection, commands, charts (LiveCharts), JSON persistence, async loading.

Advanced: Library Management System. Layered architecture (UI / Business / Data), EF Core or Dapper, unit tests (MSTest + Moq), logging, role-based login with hashed passwords.

Advanced: File Organizer Worker Service. FileSystemWatcher, rules engine, logging with Serilog, installed as a Windows Service, configuration in appsettings.json.

Advanced: REST API Client Dashboard. HttpClient + System.Text.Json, async/await with cancellation and progress, caching, error handling, WinForms or WPF UI.

Advanced: XML/LINQ Report Generator. Read data from a database, transform it with LINQ, produce XML (XML literals) and HTML reports, and export to Excel with ClosedXML.

Integration: Excel Automation Suite. VBA macros for data cleanup plus a VB.NET tool that generates Excel reports and emails them (MailKit), scheduled via Task Scheduler.

Migration: VB6/VBA to VB.NET Port. Take a legacy VB6 or VBA project and migrate it to VB.NET with tests, documenting the differences.

Systems: Plugin-Based Application. Load plugins via reflection (Assembly.LoadFrom, interfaces), custom attributes for metadata, configuration UI.

Appendix B: Interview and Review Questions

What is VB.NET, and how does it differ from VB6 and VBA?

What do Option Strict, Option Explicit, Option Infer, and Option Compare do? Why use Option Strict On?

What's the difference between Dim, Const, ReadOnly, and Static?

Value types vs reference types? Give examples.

What's the difference between And/AndAlso and Or/OrElse?

What's the difference between /, \, and Mod?

Explain ByVal vs ByRef. What happens when you pass a class instance ByVal?

What's the difference between a Sub and a Function?

How do you declare an array with 10 elements in VB? (Hint: Dim a(9).) What does ReDim Preserve do?

What is Nothing in VB? How does it behave for value types?

What do CType, DirectCast, and TryCast do, and how do they differ?

Explain Select Case features (ranges, Is, multiple values).

What's the difference between Do While...Loop and Do...Loop Until?

Explain the four pillars of OOP with VB examples.

Class vs Structure vs Module?

What do Overridable, Overrides, MustOverride, MustInherit, NotInheritable, and Shadows mean?

What's the difference between Me, MyBase, and MyClass?

Interfaces vs abstract classes: when do you use each?

How do you implement an interface member with a different name?

What are Shared members? What is a shared constructor?

Explain the access modifiers, including Friend, Protected Friend, and Private Protected.

How do events work? Compare WithEvents/Handles with AddHandler.

What is a delegate? Explain Func, Action, and Predicate.

How do you overload operators? What are Widening and Narrowing conversions?

What is IDisposable, and why use the Using statement?

What are generics? Explain constraints (As {Class, New}).

What are lambda expressions and closures in VB?

How do you write an extension method in VB?

Explain LINQ query syntax vs method syntax. What is VB's Aggregate clause?

What is deferred execution in LINQ?

What are XML literals and axis properties? (VB-specific.) What does Yield do? What is an Iterator Function?

Explain Async/Await. Why avoid Async Sub? What does Task.WhenAll do?

How do you keep a WinForms UI responsive during long operations?

What is SyncLock? How do you avoid race conditions?

What is the My namespace? Give examples.

What is late binding in VB, and when is it useful?

How do you call Win32 APIs from VB (Declare vs DllImport)?

How do you prevent SQL injection in ADO.NET?

DataReader vs DataSet: when do you use each?

How does exception filtering with When work?

What are the limitations of VB compared with C# on modern .NET?

How would you migrate a VB6 application to .NET?

Reverse a string and check whether it's a palindrome.

Find the second-largest number in an array without sorting.

Count word frequencies in a text file using a Dictionary.

Implement a Stack(Of T) class with Push, Pop, and Peek.

Write a LINQ query that groups employees by department, showing counts and average salaries.

Create a class hierarchy (Shape → Circle, Rectangle) with polymorphic Area().

Write an async method that downloads 3 URLs concurrently and reports the total size.

Write a VBA macro that highlights duplicate values in column A.

Appendix C: VB.NET Cheat Sheet

' ===== Options & imports =====
Option Strict On
Imports System.Linq

' ===== Variables =====
Dim n As Integer = 5 : Dim s = "text" : Const Pi = 3.14159
Dim arr() As Integer = {1, 2, 3} : Dim lst As New List(Of String) From {"a", "b"}
Dim dict As New Dictionary(Of String, Integer) From {{"a", 1}}
Dim nullable As Integer? = Nothing
Dim tup = (Name:="Ana", Age:=30)

' ===== Operators =====
' + - * / \ Mod ^ &   = <> < > <= >=   AndAlso OrElse Not Xor   Is IsNot TypeOf...Is Like
Dim r = If(n > 0, "pos", "neg") : Dim v = If(maybeNull, "default") : Dim len = obj?.Name?.Length

' ===== Control flow =====
If n > 0 Then
ElseIf n < 0 Then
Else
End If
Select Case n
    Case 1 To 5 : Case Is > 10 : Case Else
End Select
For i = 0 To 9 Step 1 : Next
For Each item In lst : Next
Do While n > 0 : n -= 1 : Loop
While n < 10 : n += 1 : End While

' ===== Procedures =====
Sub DoWork(ByVal x As Integer, ByRef y As Integer, Optional z As Integer = 0)
End Sub
Function Add(a As Integer, b As Integer) As Integer
    Return a + b
End Function
Dim sq = Function(x As Integer) x * x : Dim pr = Sub(m As String) Console.WriteLine(m)

' ===== Classes =====
Public Class Person
    Inherits Object
    Implements I
…
dotnet new console -lang VB | dotnet run | dotnet build -c Release | dotnet test | dotnet add package X | dotnet publish -r win-x64 --self-contained

Appendix D: VB.NET vs C# vs VBA vs VB6

End If, End Sub x = new Y(); Set x = New Y ❌ (Implements only) Pattern matching / records Default parameter passing Array lower bound Syntax comparison: Dim x As Integer = 5 If x > 0 Then... End If if (x > 0) {... } For i = 0 To 9... Next for (int i = 0; i <= 9; i++) { } Function F(a As Integer) As Integer int F(int a) Inherits Base Implements IFoo TypeOf x Is T Function(x) x * 2 List(Of String)

Appendix E: Resources

Microsoft Learn: Visual Basic documentation (language reference, programming guide, tutorials)

.NET documentation (learn.microsoft.com/dotnet), the .NET Blog (VB announcements), the VB language design repo (github.com/dotnet/vblang)

Office VBA reference (learn.microsoft.com/office/vba/api/overview)

*Visual Basic 2019 (or 2022) Made Easy*: Liew Voon Kiong *Murach's Visual Basic 2015*: Anne Boehm (excellent structured approach)

*Visual Basic 2015 Unleashed*: Alessandro Del Sole *Programming in Visual Basic 2010*: Julia Case Bradley

*Excel VBA Programming For Dummies*: Michael Alexander & Dick Kusleika

*Professional Excel Development*: Bovey, Wallentin, Bullen, Green

*Microsoft Excel VBA and Macros* (Office 2021/365): Bill Jelen & Tracy Syrstad Learning and Practice

Exercism VB.NET track,.NET Fiddle (online VB compiler), Rosetta Code (VB.NET and VBA solutions), Stack Overflow (vb.net, vba tags), VBForums, MrExcel and Excel Forum (VBA), the WiseOwl Tutorials YouTube channel (VBA), the ICSharpCode CodeConverter for learning from C# samples Suggested 12-Week Study Plan

Setup, syntax, compiler options, data types, operators Decisions, loops, procedures, strings, dates/math

Arrays, collections, enums/structures/tuples, nullables, exceptions, namespaces

Classes, properties, inheritance, interfaces Operator overloading, events/delegates, generics, IDisposable

Lambdas, extension methods, LINQ, XML literals, iterators Async/Await, threading, reflection/late binding, My namespace

Files, JSON/XML, ADO.NET, EF Core/Dapper, HTTP, interop Console, WinForms, WPF

Web APIs, worker services, debugging, testing, deployment Performance, security, best practices 51–53 + Capstone

VBA, VB6 migration, VB/C# interop, final project Final tip: Turn on Option Strict On from day one, build small WinForms apps to see results quickly, learn LINQ and Async/Await well (they're where modern VB shines), and keep your business logic in clean class libraries so they stay usable from VB, C#, or any.NET front end. Happy coding! 💻