1

In Visual Studio for C#, is it possible to find out whether a member of a class is declared in an interface that the class implements or is defined in the class or its ancestry class? If declared in an interface, which interface? Thanks.

Tim
  • 1
  • 141
  • 372
  • 590
  • 2
    Maybe add some example to better explain what you mean? – Camilo Terevinto Jun 01 '17 at 17:36
  • 1
    @CamiloTerevinto I'm not sure that edit was a good one. It sounded to me like Tim wanted to know how to figure it out *using Visual Studio*, not in code. I'll let them speak up though. – Heretic Monkey Jun 01 '17 at 17:38
  • @MikeMcCaughan now that you mention it, yes, it does sound more like that. I reverted my edit – Camilo Terevinto Jun 01 '17 at 17:40
  • @Mike: Yes, from Visual Studio. – Tim Jun 01 '17 at 17:41
  • Possible duplicate of [How to get a list of Interface members](https://stackoverflow.com/questions/9641267/how-to-get-a-list-of-interface-members) – Sam W Jun 01 '17 at 17:54
  • You can find code for this ^, but if you're asking for a tool in VS, no. – Sam W Jun 01 '17 at 18:00
  • Maybe search with Object browser can help. – DotNet Developer Jun 01 '17 at 18:28
  • If you use Resharper - it shows this information right away (on the left of the method definition, you can also click to navigate to interface). If you don't - consider start using it. – Evk Jun 01 '17 at 18:55
  • Thanks. Where can I find Resharper, and how can I install it? @Evk – Tim Jun 01 '17 at 20:28
  • Just google "Resharper" but unfortunately it is not free. But it improves your development workflow so much that I think every serious .NET developer which uses Visual Studio just have no choice. – Evk Jun 01 '17 at 20:31

0 Answers0