The IConvertible
Interface
Objects implementing the IConvertible
interface expose a series of ToXXX
methods exactly as the Convert
class does so that such objects can easily be converted into another type. This example uses a structure instead of a class, for the sake of simplicity. Listing 13.4 shows how the IConvertible
interface can be implemented.
The ThreePoint
structure is simple; it just ...
Get Visual Basic® 2010 Unleashed 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.