InterviewSolution
| 1. |
What Is The Difference Between Const And Static Read-only? |
|
Answer» The difference is that static read-only can be MODIFIED by the containing class, but const can never be modified and MUST be initialized to a COMPILE time constant. To expand on the static read-only CASE a bit, the containing class can only modify it: -- in the variable declaration (through a variable initializer). The difference is that static read-only can be modified by the containing class, but const can never be modified and must be initialized to a compile time constant. To expand on the static read-only case a bit, the containing class can only modify it: -- in the variable declaration (through a variable initializer). |
|