Constant:
--------
ReadOnly:
--------
--------
- Constant value is declared using "const" keyword.
 - A const needs to be declared and initialized at declaration only.
 - A const’s value is evaluated at design time.
 - A const can not be static.
 
ReadOnly:
--------
- ReadOnly value is declared using "readonly" keyword.
 - A readonly can be initialized at declaration or by the code in the constructor.
 - A readonly’s value is evaluated at runtime.
 - A readonly can be static.
 
No comments:
Post a Comment