Previous | Index | Next 

[HOWTO] Change the base class of a VB.NET class

By default, all VB6 classes that are converted to VB.NET implicitly inherit from the System.Object class. In some scenarios, you might want that one or more classes inherit from a different class. This is often desirable for data objects and business objects. For example, let’s see how you can make the BOWidget class to inherit from a MyFramework.BusinessBase class

        ' add this pragma at the top of the  Widgets.cls file
        '## PostProcess  "Public Class  Widget\s*\n",
            "$0\tInherits  MyFramework.BusinessBase\n" 

 

Previous | Index | Next