Overloading Operators in C#(developer.com)
submitted by
redcap(420) 3 years, 5 months ago
Operator overloading, also known as overloading, provides a way to define and use operators such as +, -, and / for user-defined classes or structs. It allows us to define/redefine the way operators work with our classes and structs. This allows programmers to make their custom types look and feel like simple types such as int and string. It consists of nothing more than a method declared by the keyword operator and followed by an operator. There are three types of overloadable operators called unary, binary, and conversion. Not all operators of each type can be overloaded. We will cover each type of operator in more detail below.
|category: C#
|Views: 14
tags:
C# another
Everyones tags:
Your Tags: