Hi,
I was thinking to wrtite a series of tips on Refactoring exercise from past couple of months.Here goes the result of that exercise
Tip 1
Try to declare the variable close to its first value assignment.
For eg :
Try to
avoid this -
private void Method()
{
int Var1;
int Var2;
int Var3;
Var1 = 10;
}
Good Practice
private void Method()
{
int Var2;
int Var3;
int Var1;
Var1 = 10;
}
This approach will help to increase the readability of the code snippet,Hence easy to maintain and enhance.
I hope this helps.
Regards,
-Vinayak
Motivated achiever who guides organizations in applying technology to business settings, provides added value, and creates project deliverables in a timely manner. An experienced Technical Consultant, have successfully led large project teams of more than 20 people from requirements gathering to implementation and support using C#, .NET ,ADO.NET, ADO.NET Entity Framework,ASP.NET,ASP.NET MVC, WCF and SQL Server.