Friday, January 11, 2013

What is difference between constants and read-only?

Constant variables are declared and initialized at compile time. The value can’t be changed after wards.

Read-only variables will be initialized only from the Static constructor of the class. Read only is used only when we want to assign the value at run time.

No comments:

Post a Comment