Since updating to ReSharper 5.1, I have discovered quite a few new warnings in files that were previously clean. I have already downgraded to a suggestion the one that reports almost any foreach() loop can be made a Linq expression, as I feel it often results in less readable code. There are some new warnings I will fix, though.
But, one currently has me stumped. On a generic function like:
protected static T ShowDialog<T>(Action act) where T : Form
ReSharper now underlines the T in the angle-brackets, i.e. <T>, and reports "Type parameter 'T' hides class 'T'". If I use Alt+Enter to review the possible resolutions to this issue, ReSharper suggest only to suppress this warning with a #pragma. No other way to disable the warning at all. Ack!
I have no idea what class ReSharper is referring to. If I try "new T()" in another non-generic function in the same class, Resharper reports "Cannot access internal class 'T' here". If I change the generic name T to TForm, this fixes the problem, but T is my usual generic default for only one type. This gets used in programming books on the subject for multiple languages.
Couldn't we please have T back? Or is there really something simple I am just missing completely that will allow me to get rid of all these warnings without renaming all my type parameters.
Love the software, though. It has made moving from Java and IntelliJ positively enjoyable. Thanks for the worldclass tools!