- Constants, represented by the const keyword – are fields that remain constant for the life of the application and their value is set at compile-time.
- When you define a field with the readonly keyword, you have the ability to set that field's value in one place: constructor.
Difference between constant & read only fields
Subscribe to:
Post Comments
(
Atom
)
0 comments :
Post a Comment