Quiz Yourself: Classes and OOP II
Assess your understanding of inheritance, polymorphism, casting, and static members in C#.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
(Select all that apply.) You are designing a Temperature class. You want developers to be able to seamlessly treat it as a double for math operations, but you want to force them to be explicit when converting a double into a Temperature to prevent accidental data handling errors.
Which combination of operators should you define? Multi-select
A.
implicit operator double
B.
explicit operator double
C.
implicit operator Temperature
D.
explicit operator Temperature
1 / 12
...