Saturday, October 02, 2004

Visual Basic Developer Center: Database Developer Corner: Calling

Visual Basic Developer Center: Database Developer Corner: Calling: "As most of you realize, converting your VB6 apps to the .NET platform isn't as simple as recompiling. Partly because of this, 'legacy' VB6 apps are likely to be with us for some time. Still, there's no impenetrable wall separating COM-based VB6 and .NET technology. COM Interop provides you backward compatibility, but you also have forward compatibility as well. In this month's column, Carl Ganz discusses two ways to take advantage of the power of .NET while still continuing to maintain your legacy VB6 apps.
Suppose you've created a class in a .NET assembly that retrieves data from a table and runs a series of complex calculations to produce, say, a salesperson's commission. This commission calculation class can service the .NET application it was designed for as well as your legacy application. Or, perhaps you needed to rewrite the legacy commission class and decided to do it in .NET. In the following example, we'll examine something much simpler than a commission calculation algorithm. Our sample class has two properties, First and Second, and one method, AddTogether (see Listing 1). "

No comments: