+ 1

Const Readonly

What is the difference between Const and Readonly?

22nd Oct 2021, 6:47 PM
MJARAB
MJARAB - avatar
1 Antwort
+ 3
const is constant already at compilation, the value must be set at declaration readonly is constant during runtime – it may be set in the constructor of the object
22nd Oct 2021, 8:46 PM
Lisa
Lisa - avatar