Gunnar Peipman's ASP.NET blog

ASP.NET, C#, SharePoint, SQL Server and general software development topics.






Refactoring: introduce constant

One way to write messy code is to use constant values in code without any explanations about their values or purpose. Sometimes it feels like too small problem to think about, specially when there are only couple of constants, but I am sure that hard coded constants may waste developers valuable time more than one may think at first place. To make this kind of code easier to read and understand we can use refactoring method called introduce constant.


NB! This blog is moved to

Click here to go to article


nirmshah_in said:

Use constant keyword as well.

# April 8, 2009 10:08 PM

DigiMortal said:

Thanks for feedback. The code example is updated.

# April 9, 2009 2:50 AM