Why are the utilities constreplaced with their values at compile time, but then still included in the assembly? At least it shows IL DASM and Reflector.
I am currently using constmany magic numbers and strings to determine to simplify code changes without affecting runtime performance.
Now I know that this does not affect the memory used, but still affects the compiled assembly size, which is crucial, for example, for mobile phone applications.
Another disadvantage is that other people more easily understand magic numbers when viewing disassembled code.
I'm really curious why this particular compiler (Mono, as well as .NET) does this?
source
share