| Preface | ix |
1. | Visual Basic .NET and .NET Programming | 1 |
| Visual Basic and .NET | 1 |
| The .NET Platform | 3 |
| The .NET Framework | 3 |
| The VB.NET Language | 4 |
| The Structure of VB.NET Applications | 4 |
| The Development Environment | 5 |
2. | Getting Started with VB.NET | 6 |
| What's in a Program? | 8 |
| Your First Program: Hello World | 9 |
| Examining Your First Program | 11 |
3. | Object-Oriented Programming | 14 |
| Creating Models | 15 |
| Classes and Objects | 16 |
| Defining a Class | 17 |
| Class Relationships | 18 |
| The Three Pillars of Object-Oriented Programming | 19 |
| Encapsulation | 19 |
| Specialization | 20 |
| Polymorphism | 21 |
| Object-Oriented Analysis and Design | 21 |
4. | Visual Studio .NET | 23 |
| Start Page | 25 |
| Inside the Integrated Development Environment (IDE) | 27 |
| IntelliSense | 29 |
| Building and Running | 30 |
| For More Information | 31 |
5. | VB.NET Language Fundamentals | 32 |
| Types | 32 |
| Variables | 36 |
| Constants | 39 |
| Strings | 47 |
| Statements | 47 |
| Whitespace | 48 |
6. | Branching | 49 |
| Unconditional Branching Statements | 50 |
| Conditional Branching Statements | 52 |
| Iteration (Looping) Statements | 60 |
7. | Operators | 71 |
| The Assignment Operator (=) | 71 |
| Mathematical Operators | 71 |
| Relational Operators | 76 |
| Logical Operators Within Conditionals | 77 |
| Operator Precedence | 79 |
8. | Classes and Objects | 82 |
| Defining Classes | 83 |
| Method Arguments | 94 |
| Constructors | 96 |
| Initializers | 98 |
| Copy Constructors | 100 |
| The Me Keyword | 101 |
| Using Shared Members | 102 |
| Destroying Objects | 105 |
9. | Inside Methods | 107 |
| Overloading Methods | 107 |
| Encapsulating Data with Properties | 110 |
| Passing by Value and by Reference | 115 |
10. | Basic Debugging | 121 |
| Setting a Breakpoint | 121 |
| The Call Stack | 129 |
11. | Inheritance and Polymorphism | 130 |
| Specialization and Generalization | 130 |
| Inheritance | 133 |
| Polymorphism | 136 |
| Abstract Classes | 142 |
| NotInheritable Classes | 145 |
| The Root of All Classes: Object | 146 |
| Boxing and Unboxing Types | 148 |
12. | Structures | 151 |
| Defining a Structure | 152 |
13. | Interfaces | 157 |
| Defining an Interface | 158 |
| Implementing an Interface | 159 |
| Implementing More Than One Interface | 163 |
| Casting to an Interface | 165 |
| Extending Interfaces | 170 |
| Combining Interfaces | 173 |
| Overriding Interface Implementations | 174 |
14. | Arrays | 180 |
| Arrays | 181 |
| Multidimensional Arrays | 191 |
| System.Array | 199 |
| Indexers and the Default Property | 202 |
15. | Collection Interfaces and Types | 212 |
| The Collection Interfaces | 212 |
| Array Lists | 224 |
| The Collection Class | 226 |
| Queues | 229 |
| Stacks | 233 |
| Copying from a Collection Type to an Array | 236 |
16. | Strings | 239 |
| Creating Strings | 239 |
| Manipulating Strings | 241 |
| Regular Expressions | 255 |
| The Regex Class | 256 |
17. | Throwing and Catching Exceptions | 259 |
| Throwing Exceptions | 260 |
| Searching for an Exception Handler | 260 |
| The Throw Statement | 261 |
| The Try and Catch Statements | 263 |
| How the Call Stack Works | 264 |
| Creating Dedicated Catch Statements | 266 |
| The Finally Statement | 268 |
| Exception Class Methods and Properties | 270 |
| Custom Exceptions | 273 |
18. | Applications and Events | 276 |
| Creating a Windows Application | 276 |
| Events | 280 |
| Server-Side Code | 287 |
19. | Afterword | 289 |
| Where to Go from Here | 289 |
| Advanced Topics in VB.NET | 289 |
| Web (ASP .NET) Programming | 291 |
| Windows Forms Programming | 292 |
| Other Resources | 292 |
| Index | 293 |