# 158 - Exploring Operator Overloading in C#


1/12/2010
Level: Intermediate
Tags: .Net 3.0 Dot Net
Author:
Derik Whittaker
 
Presented By:
Codebetter.com


In this episode we are going to take a look at how create overloaded operators for your objects.

perator overloading permits user-defined operator implementations to be specified for operations where one or both of the operands are of a user-defined class or struct type. When creating your own operators there are many different operators which can be overloaded.

+, -, *, /, %, &, |, <<, >> All C# binary operators can be overloaded
+, -, !, ~, ++, –, true, false All C# unary operators can be overloaded
==, !=, <, >, <= , >= All relational operators can be overloaded, but only as pairs.

Click here to Watch this Episode