One of the new features we have added to ReSharper 6 is the ability to find out why ReSharper makes certain suggestions. Often, ReSharper can provide a suggestion such as the one shown below:
For some people this might be clear, whether or not they would agree with the suggestion. For others it might make little sense, specially developers that are often new to the language or framework. In ReSharper 6, we have added a feature* which provides more information as to why these suggestions, hints or warnings are made:
When invoking the QuickFix, by pressing Alt+Enter, ReSharper now provides a new entry which is “Why is ReSharper suggesting this?”. By clicking on this entry, you will be redirected to a Wiki on the JetBrains site where you will be provided with more detailed information in regard to the suggestion. For instance, when being displayed with the following:
by selecting the “Why is ReSharper suggesting this?” action, we will be displayed with the following information:
Over 40 Entries done, more to come
Currently we have over 40 entries in the Wiki and are continuing to add more entries. We will also be updating and reviewing them with more examples were required. As always, please let us know if you have any feedback.
* There is a plug-in which is available for previous editions of ReSharper called WhySharper, which this idea was partially based on. We realized however, that to make sure the information is kept up to date, it would be better to have this functionality built into the product.