Search This Blog

Tuesday, December 30, 2008

What is the difference between Readonly and constant in C#

The only difference between both is in their intialization.
if u declare a constant field you must set the value before ntializing object.
but readonly you can declare it in constructor.
both cannot be altered once declared.

No comments: