Commenting out a block of code in VS2005

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dennis

    Commenting out a block of code in VS2005

    How do you comment out a block of VB.Net code in VS2005? It seems to me
    in an earlier version of VS I just ran the CommentRegion macro from the
    Macro Explorer. But in VS2005 that does nothing.

    --

    Dennis
  • Tom Shelton

    #2
    Re: Commenting out a block of code in VS2005

    On 2008-04-01, Dennis <nobody@nowhere .comwrote:
    How do you comment out a block of VB.Net code in VS2005? It seems to me
    in an earlier version of VS I just ran the CommentRegion macro from the
    Macro Explorer. But in VS2005 that does nothing.
    >
    Comment:
    Higlight code, Ctrl-K,Ctrl-C

    Uncomment:
    Highlight code, Ctrl-K,Ctrl-U

    There's also a button in the text editor toolbar :)
    --
    Tom Shelton

    Comment

    • Dennis

      #3
      Re: Commenting out a block of code in VS2005

      On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
      <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote:
      >There's also a button in the text editor toolbar :)
      Elementary my dear Watson!

      --

      Dennis

      Comment

      • Michael C

        #4
        Re: Commenting out a block of code in VS2005

        "Dennis" <nobody@nowhere .comwrote in message
        news:mta5v3hh4n hl1uuae52tnhu9g i94qj3glq@4ax.c om...
        On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
        <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote:
        >
        >>There's also a button in the text editor toolbar :)
        >
        Elementary my dear Watson!
        If you're using C# then try

        /*
        My comment
        */
        >
        --
        >
        Dennis

        Comment

        • Michael C

          #5
          Re: Commenting out a block of code in VS2005

          "Dennis" <nobody@nowhere .comwrote in message
          news:mta5v3hh4n hl1uuae52tnhu9g i94qj3glq@4ax.c om...
          On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
          <tom_shelton@YO UKNOWTHEDRILLco mcast.netwrote:
          >
          >>There's also a button in the text editor toolbar :)
          >
          Elementary my dear Watson!
          Ignore that, I frogot we was in the VB group! :-)
          >
          --
          >
          Dennis

          Comment

          • Tom Shelton

            #6
            Re: Commenting out a block of code in VS2005

            On Apr 1, 9:46 pm, "Michael C" <m...@nospam.co mwrote:
            "Dennis" <nob...@nowhere .comwrote in message
            >
            news:mta5v3hh4n hl1uuae52tnhu9g i94qj3glq@4ax.c om...
            >
            On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
            <tom_shel...@YO UKNOWTHEDRILLco mcast.netwrote:
            >
            >There's also a button in the text editor toolbar :)
            >
            Elementary my dear Watson!
            >
            Ignore that, I frogot we was in the VB group! :-)
            >
            >
            >
            >
            >
            --
            >
            Dennis- Hide quoted text -
            >
            - Show quoted text -
            Even in C#, it's easier to:

            Highlight code, hit Ctrl-K,Ctrl-C

            :)

            --
            Tom Shelton

            Comment

            • Phillip Taylor

              #7
              Re: Commenting out a block of code in VS2005

              On Apr 2, 5:54 am, Tom Shelton <tom_shel...@co mcast.netwrote:
              On Apr 1, 9:46 pm, "Michael C" <m...@nospam.co mwrote:
              >
              >
              >
              "Dennis" <nob...@nowhere .comwrote in message
              >
              news:mta5v3hh4n hl1uuae52tnhu9g i94qj3glq@4ax.c om...
              >
              On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
              <tom_shel...@YO UKNOWTHEDRILLco mcast.netwrote:
              >
              >>There's also a button in the text editor toolbar :)
              >
              Elementary my dear Watson!
              >
              Ignore that, I frogot we was in the VB group! :-)
              >
              --
              >
              Dennis- Hide quoted text -
              >
              - Show quoted text -
              >
              Even in C#, it's easier to:
              >
              Highlight code, hit Ctrl-K,Ctrl-C
              >
              :)
              >
              --
              Tom Shelton
              Edit Menu Advanced Comment Selection

              Comment

              • Tom Shelton

                #8
                Re: Commenting out a block of code in VS2005

                On Apr 2, 4:40 am, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
                wrote:
                On Apr 2, 5:54 am, Tom Shelton <tom_shel...@co mcast.netwrote:
                >
                >
                >
                >
                >
                On Apr 1, 9:46 pm, "Michael C" <m...@nospam.co mwrote:
                >
                "Dennis" <nob...@nowhere .comwrote in message
                >
                >news:mta5v3hh4 nhl1uuae52tnhu9 gi94qj3glq@4ax. com...
                >
                On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
                <tom_shel...@YO UKNOWTHEDRILLco mcast.netwrote:
                >
                >There's also a button in the text editor toolbar :)
                >
                Elementary my dear Watson!
                >
                Ignore that, I frogot we was in the VB group! :-)
                >
                --
                >
                Dennis- Hide quoted text -
                >
                - Show quoted text -
                >
                Even in C#, it's easier to:
                >
                Highlight code, hit Ctrl-K,Ctrl-C
                >
                :)
                >
                --
                Tom Shelton
                >
                Edit Menu Advanced Comment Selection- Hide quoted text -
                >
                - Show quoted text -
                another possible way, but a lot more work then just using the
                keyboard :)

                --
                Tom Shelton

                Comment

                • kimiraikkonen

                  #9
                  Re: Commenting out a block of code in VS2005

                  On Apr 3, 2:58 am, Tom Shelton <tom_shel...@co mcast.netwrote:
                  On Apr 2, 4:40 am, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
                  wrote:
                  >
                  >
                  >
                  >
                  >
                  On Apr 2, 5:54 am, Tom Shelton <tom_shel...@co mcast.netwrote:
                  >
                  On Apr 1, 9:46 pm, "Michael C" <m...@nospam.co mwrote:
                  >
                  "Dennis" <nob...@nowhere .comwrote in message
                  >
                  news:mta5v3hh4n hl1uuae52tnhu9g i94qj3glq@4ax.c om...
                  >
                  On Tue, 01 Apr 2008 14:03:58 -0700, Tom Shelton
                  <tom_shel...@YO UKNOWTHEDRILLco mcast.netwrote:
                  >
                  >>There's also a button in the text editor toolbar :)
                  >
                  Elementary my dear Watson!
                  >
                  Ignore that, I frogot we was in the VB group! :-)
                  >
                  --
                  >
                  Dennis- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  Even in C#, it's easier to:
                  >
                  Highlight code, hit Ctrl-K,Ctrl-C
                  >
                  :)
                  >
                  --
                  Tom Shelton
                  >
                  Edit Menu Advanced Comment Selection- Hide quoted text -
                  >
                  - Show quoted text -
                  >
                  another possible way, but a lot more work then just using the
                  keyboard :)
                  >
                  --
                  Tom Shelton- Hide quoted text -
                  >
                  - Show quoted text -
                  And another way would be:
                  Press "home" button that brings you to beginning of code line then put
                  a apostrophe :-) Same way to remove.

                  Comment

                  Working...