|An example of overloaded operators: Interval|
We introduce a new type, struct Interval, in which we implement a number of operations by overloads of some of the well-known C# operators.
An interval is a type that represents the ordered sequence of numbers between one integer and another
We program the type Interval with value semantics
This type defines a number of overloaded operators in struct Interval.
This class uses the operators on given interval values.
The operators ==, !=, <, and > in class Card.
Read more about the interval and playing card examples in the text book version of this material.