Results 1 to 2 of 2
Like Tree1Likes
  • 1 Post By jmcilhinney

Thread: What does the "Go to definition" function do?

  1. #1
    VitzzViperzz is offline C# Forum Enthusiast
    .NET Framework
    .NET 4.5
    Join Date
    Jan 2017
    Rep Power

    What does the "Go to definition" function do?

    I was at a C# seminar last night and I saw that the guy presenting used the "Go to definition" a lot. I forgot to ask him what it actually did, but when I tried it myself I saw that it brings lots of code like this:

    public static void Write(ulong value);
    Some say that these are definitions - but what are there the definitions of? Just curious to know.


  2. #2
    jmcilhinney is online now C# Forum Moderator
    .NET Framework
    .NET 4.0
    Join Date
    Apr 2011
    Rep Power
    You can use that on an identifier anywhere in code and it will take you to where that identifier is declared. The identifier might be for a variable, a property, a method, a type or whatever. If you use that option on a member of an interface then 'Go to definition' will take you to the declaration in the interface while the 'Go to implementation' option will take you to the implementation of that member in a class. If it's implemented in multiple classes then you will be given the choice of which to navigate to.
    VitzzViperzz likes this.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts