Only a small percentage of Visual Basic 6.0 programmers ever found the need to create any class modules other than the ones that were automatically created when they built Visual Basic 6.0 forms. In addition, most programmers who did create their own class modules in Visual Basic 6.0 did so only because they wanted to build Microsoft ActiveX® components and they had to use class modules to do it.
In Visual Basic .NET, as in all the other .NET languages, object-oriented programming (OOP) is not an option—it's a requirement. Every piece of code you write is part of a type of some kind, either a class, an interface, a struct (structs are value types similar to the user-defined types in Visual Basic 6.0), or an enumeration. Even the seemingly stand-alone procedures in Visual Basic .NET modules are actually implemented behind the scenes as shared methods of hidden classes.
|