Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • ok...so does it get a memory allocated to it? and is it alive as long the application is running? Commented May 12, 2013 at 16:06
  • It depends. public const double pi = 3.14 will simply replace anywhere pi is referenced with the constant 3.14. The constant itself will be part of the bytecode and thus takes up space (in the compiled CIL), but no more than literally putting "3.14" everywhere instead of "pi". And since it lives in bytecode, it does not ever live, per se. Commented May 12, 2013 at 16:15