cool hit counter [C#] The key to making ReSharper gray out unused non-private members_Intefrankly

[C#] The key to making ReSharper gray out unused non-private members


Environment: VS2010 + ReSharper8

First the answer.

1. Set Non-private accessibility to Warning in Inspection Severity. As pictured.

This page is in the ReSharper menu →Options. Tip: The options are searchable, the search box is above the options area

2. Enable Solution Wide Analysis (SWA). There are several methods of activation.

- Double-click the dot that falls at the bottom right corner of VS, or right-click the dot → Analyze Errors in Solution. As pictured.

- Menu ReSharper→Options→Code Inspection→Settings→Analyze errors in whole solution, check it. As pictured.

Enabling this feature will pop up a prompt saying it will slow down VS performance and take up more memory or something, just Ok it. But do be cautious if the project is not small or the machine sucks. As I understand it, when enabled, RS will check member usage across the solution, which is not a light and easy job when you think about it, with so many projects and so many class members in one Solution, each one has to be checked. Also just a heads up, this function is also checked within the current Solution, for some very common class members, it is not used in this solution, but may be used in other solutions, so don't tick when you see a grey member either ~ we all understand it anyway, I'm the one being long-winded.

Here goes the jibber-jabber.

I found this problem because I have always known that ReSharper will gray out private members without any use, which is good for me as a mild code-cleaner, but non-private members will not be grayed out, and I found Non-private accessibility in the options, but setting it to Warning didn't help. But at first she didn't get to the point either, said I should rebuild the project/solution or whatever to see, and then asked me to direct the RS configuration to her ...... Anyway, I have communicated several emails back and forth, but I have suffered from my broken English. I would like to thank my friend - Alexis, the MVP of MS (this brother is active in MS support community), as well as Kingsoft Wordbar ~ I don't need to thank the country, he/they have given me a lot of help in translation, otherwise it would be hard for me to finish this request.

Later on, I even managed to seduce the other party to give me remote assistance ~ there is an off-topic about the choice of remote tools, at first I said I was using an IM called QQ, which has a simple remote assistance function, see if it is convenient for you ...... I'm not sure if I'll be able to get a good deal on this. Then I made an appointment, I turned on the TV, told her the ID and PWD, she came over remotely, I demonstrated the "problem" to her, then she guided me through the RS configuration again, said to take it back and study it, let me know if I heard anything, and left.

After a few days wrote her back, and this time got to the point, and talked about the significance of this SWA, and asked me to enable it to see, and sure enough the problem was solved, and then I thanked her a thousand times, and then nothing more. I'm guessing she asked other people for advice before she poked at the problem too.

Anyway, from now on it is always clear and unambiguous to weed out useless private and non-private members, thanks again to RS, thanks to Alexis, and thanks to Kingsoft.

- Man Bi -


Recommended>>
1、Summary of vulnerabilities caused by PHP weak types in the real world
2、Africa Holdings VP calls on central banks to replace dollars with bitcoin
3、The unique medical forensic chain of the Hereford chain
4、Makeblock invited to the 2018 Childrens Future of Innovation Conference
5、CardanoStakingPoolsAda Equity Pool Introduction

    已推荐到看一看 和朋友分享想法
    最多200字,当前共 发送

    已发送

    朋友将在看一看看到

    确定
    分享你的想法...
    取消

    分享想法到看一看

    确定
    最多200字,当前共

    发送中

    网络异常,请稍后重试

    微信扫一扫
    关注该公众号