using the ReSharper Tool with VS.NET IDE 2010 for code improvements

66 Views Asked by At

I am new to ReSharper and have integrated with Visual Studio 2010. I have found a suggestion in the code as follows,

string query;
query = "SELECT * FROM Employee";

The ReSharper tool asked me to change the above code to

const string query = "SELECT * FROM Employee";

What is the performance benefit i get from this?

1

There are 1 best solutions below

2
On BEST ANSWER

Almost certainly very little (or none), but the code is more correct (if the string is not being reassigned, which ReSharper has determined it not to be).

After all, it's easier to sleep at night with clean code! ;)