The compiler should replace the constant's value in the IL wherever the
const variable is used. Just compile your code with and without the const
keyword and observe the differences in IL using ILDASM
Cheers
Daniel
--
http://www.danielmoth.com/Blog/
"Tomer" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> Hi,
> When I define a const, does it takes memory in run time, or does the
> compiler replace the code where I've used the const var, and then compile
> the program?
>
> Tomer.
>
>