In my understanding C# started as a static language and with some enhancements in the .NET framework and started supporting the dynamic nature of the language.
I think the "var" keyword in c# is very powerful when it comes to loading the DLLs at the runtime and we do not know the types coming our way, it is very helpful.
But I think it brings the overhead of determining the type of the variable if the variable has been declared as a var at design-time. Now, re-sharper which is responsible for making our code much more nicer and cleaner by doing some nice suggestions has suggested me something like below:
My code looks like this:
StatusResult result = new StatusResult();
Resharper suggests that it has to be converted into
var result = new StatusResult();
Why is that? why should I buy resharper's suggestion when I think that it is not a good idea? Or may be I am wrong?