Creating Your Own Procedures

As you write Visual Basic .NET applications, you'll want to break your code up into manageable “chunks.” This shouldn't be a new concept to you, and it should make sense. The larger the blocks of code you're working with, the harder it is to debug, maintain, and manage the code. You've seen several examples of this throughout this chapter already.

The building block of Visual Basic .NET code is the procedure. A procedure has a beginning (a declaration), a middle (the code inside the procedure) and an end (the End Sub statement, for example). As you'll see throughout this book, there are a number of types of procedures, but for now, we'll focus on Sub and Function procedures.

A Sub procedure is a block of code that ...

Get ASP.NET Developer's JumpStart now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.