Results 1 to 3 of 3

Thread: [RESOLVED] Links to code in editor?

  1. #1

    Thread Starter
    Lively Member VisualBrian's Avatar
    Join Date
    Nov 2019
    Location
    North America
    Posts
    72

    Resolved [RESOLVED] Links to code in editor?

    I keep notes and a basic explanation of the programs path/progression at the top of my code to reference when I need to implement changes or additions, or just to remember what I did.
    Is it possible in VB.NET to also create links to sections of code or subs and build an index of sorts?
    I may not know anything, but I know it well!

  2. #2
    Super Moderator dday9's Avatar
    Join Date
    Mar 2011
    Posts
    12,370

    Re: Links to code in editor?

    You can document your code using XML comments. Documentation here: https://docs.microsoft.com/en-us/dot...-code-with-xml

    So for example, if I have two sub-routines named Sub1 and Sub2, and I wanted anyone looking at the code to know that Sub1 is important to Sub2, then I could do the following:
    Code:
    ''' <summary>
    ''' here is a description that shows up in the IDE
    ''' </summary>
    ''' <see cref="Sub1()"/>
    Private Sub Sub2()
        ' blah blah blah
    End Sub
    Now if I put my cursor over <see cref="Sub1()"/> and hit F12, I will jump to the Sub1 method.
    "Code is like humor. When you have to explain it, it is bad." - Cory House
    VbLessons | HtmlLessons | CssLessons | Code Tags | Sword of Fury - Jameram

  3. #3

    Thread Starter
    Lively Member VisualBrian's Avatar
    Join Date
    Nov 2019
    Location
    North America
    Posts
    72

    Re: Links to code in editor?

    That will do nicely. I can simply mouse over "Sub1()" and select/click from the resulting tool tip. Now I can reference the code I am explaining.

    Thank you.

    EDIT: Actually, this is not going to work as I intended, though it does work well for the purpose you described.
    Last edited by VisualBrian; Dec 8th, 2020 at 05:00 PM.
    I may not know anything, but I know it well!

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width