Monday, June 28, 2010

Differences between 'const' and 'read-only' in C#:

'Const': 'Read-only':
•Can't be static. _______________ •Can be either instance-level or static.
•Value is evaluated at compile time. _______________ •Value is evaluated at run time
•Initialized at declaration only. _______________ •Can be initialized in declaration or by code in the constructor.

0 comments:

Post a Comment