Chapter 10. Subroutines and Functions

In this chapter you will learn about ways to structure your programs in a better way. You will study Visual Basic subroutines and functions, which are known generically as procedures. The chapter will be divided in the following categories:

All the programs you have written so far used the same pattern: you have a module (Module1) created by default, and this module has a Sub Main, in which your code resides. When the End Sub is reached, the program ends. As you probably imagined, these were just simple examples to illustrate the introductory concepts of the language. A real-world program would contain much more code than the few ...

Get Visual Basic® .NET by Example 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.