Magic Numbers is probably one of the big no-noes along with goto statements that one learns about when starting out with software engineering. In this case, however, it is probably best to let sleeping dogs lie as the damage/design decision has already been made.
I would disagree on this point. I'm sure most modern compilers including the .NET C# compiler would use constant folding at compile time to substitute the magic numbers. There would be no performance hit at all at runtime.
Phantom said:Lets not forget, every variable goes to the Stack\Heap, there are ALOT of clilic messages.
You would notice a HUGE performance decrease due to this fact, I don't even think modern computers could handle thousands upon thousands of static variabls within the Heap.
If you don't think it will make a difference, test your theory out
I would disagree on this point. I'm sure most modern compilers including the .NET C# compiler would use constant folding at compile time to substitute the magic numbers. There would be no performance hit at all at runtime.