L. P. with Microsoft C# - Level 4-Quiz-2
- To overload an operator means Give it a custom response based on class type.
- What is a problem associated with overusing overloaded operators?
The code becomes confusing.
- Operators must be defined as static.
- Operator keyword is used to overload an operator.
- How do you use an overloaded operator?
Place the operator in a statement.
- Create a method is an alternative to overloading operators.
- What special consideration is needed for overloading a comparison operator?
They should be overloaded in pairs.
- What additional consideration should you make when overloading the IsEqualTo operator?
You should also overload the Equals operator.
- Conversion casts can be explicit or implicit. Explicit conversions are needed if there is a possibility of error.
- Explicit type of conversion should you use if you want to throw an exception.
- What type of custom conversions can you make?
Implicit or explicit.
Permalink |
Comments (0) | Hits: 1109 | Time: 13:53:48