class, any attempt to create an object will result in a compile-time error. It would also be an
constructor.
9
Operator Overloading
C
# allows you to define the meaning of an operator relative to a class that you create.
This process is called
operator overloading.
By overloading an operator, you expand its
usage to your class. The effects of the operator are completely under your control and
may differ from class to class. For example, a class that defines a linked list might use the
Do'stlaringiz bilan baham: