Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Overload operators??
Message
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00615854
Message ID:
00615877
Views:
21
>>So, what does overload operators mean?
>If you create a custom type, you may want to add two variables of those types one to other. You can "overload" the "+" operator in the way it can perform the operation on your custom type.

James,

Think about FoxPro. You can add either numbers or strings with the + operator.

"a" + "b" && result "ab"
1 + 2 && result 3

Think about what FoxPro has to do. It has to first translate the + operator into an add method. Then it has to figure out what data types it is adding (string or number) and call the correct method according to the data types. This is operator overloading.

-Dave
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform