locked
In editing code, how to pair if..then..else up RRS feed

  • Question

  • Hi all,

    is there any way to pair IF.. THEN..ELSE up visually by lines or other visual elements?

    thanks,

    Shu Zi

    Monday, March 25, 2019 1:47 PM

All replies

  • Hi all,

    is there any way to pair IF.. THEN..ELSE up visually by lines or other visual elements?

    thanks,

    Shu Zi

    Hi Shu,

    Can you explain your needs in more details .............

    good luck


    Regards From Egypt

    Monday, March 25, 2019 1:52 PM
  • Hi all,

    is there any way to pair IF.. THEN..ELSE up visually by lines or other visual elements?

    thanks,

    Shu Zi

    Hi

    If you open  Menu->Tools->Options->Text Editor->General and check the option Show Structure Guidelines, then maybe this is what yoou want.


    Regards Les, Livingston, Scotland

    Monday, March 25, 2019 2:10 PM
  • It's unclear exactly what you want but perhaps you mean showing two if statements side by side, if so at least in VS2017 you can first select "new windows" then select New Vertical Tab then using scrollbars line up the statements.


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, March 25, 2019 2:13 PM
  • Thanks a lot.

    I'm using VS2015 and can't find the "Show Structure Guidelines".

    Monday, March 25, 2019 7:21 PM
  • Sorry, I may bring some confusion into our responses. when I read code, always there are IF..Then.. Else structures embedded together. I hope there is way to tell these structures visually, like lines.

    thanks,

    Monday, March 25, 2019 7:26 PM
  • Thanks a lot.

    I'm using VS2015 and can't find the "Show Structure Guidelines".


    I think this was new in VS2017.

    Search Documentation

    SerialPort Info

    Multics - An OS ahead of its time.

     "Those who use Application.DoEvents have no idea what it does

        and those who know what it does never use it."    former MSDN User JohnWein

    • Proposed as answer by Alex-KSGZ Tuesday, March 26, 2019 1:59 AM
    Monday, March 25, 2019 7:29 PM
  • Like this (if not using VS2017 jump to bottom of this reply)

    Which is settable under VS2017 options

    Otherwise

    https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange


    Monday, March 25, 2019 7:56 PM