Save Time and Effort by Overloading Operators.

Category:
C#, VB.NET, ASP.NET
Type:
Classes
Difficulty:
Beginning

Author: Anonymous

Version Compatibility: Visual Basic.NET

More information:
This has to be one of the coolest things I've stumbled across in my transition from VB6 to VB.NET-- overloading operators. Fundamentally, it means to add an operator procedure to your class or structure to indicate how an operation should be performed, and you can overload them multiple times in your class, if need be. Each version must have unique parameters, one of which must be the type of your class. The Pixel32 structure submitted is a nice example of how operator overloading can save time and effort.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: