Show private methods/fields as suggestion?

When I type something like "MyOtherClass." it will show me the public fields and methods so I can auto complete with tab. Is there a way to also show private methods? Like some kind of toggle would be perfect. I often find myself calling a method from another class that was made private because I had no reason yet to do otherwise. When I remember the exact name I can type it out and use alt+Enter to make it public, but more often than not I do not remember the exact name and have to stop, go to that class, make the method public and then have to go back to the class I was working in.

0
1 comment

Hi Julian

Unfortunately, this is not possible as it works as designed according to C# isolation rules. A completion list consists only of items available in the current context. QuickFix allows you to fix the visibility of a member if necessary.

If you think this could be useful in many cases, I think the best choice here would be to use our tracker here and submit a request. On the tracker, others can see your request and add their vote if they find such a tool would be useful. It helps our team to understand better which features/tools our users are eager for. I believe this can help give the best visibility for your request.

Let me know if there is anything else I can help you with. Have a great day!

 

0

Please sign in to leave a comment.