Friday 6 December 2013

what is difference between CONST and Readonly ?

Readonly variable is declare at rum time (before exit of constructor). So, Readonly variable has different value depending on the constructor used at rumtime.

CONST varible is declare at compile time.

Mean, a const field is a compile-time constant, the Readonly field can be used for run-time constants.

No comments:

Post a Comment