Home All Groups Group Topic Archive Search About

coment a block of code

Author
5 Nov 2006 6:18 AM
GS
how can one quickly comment out a block of selected code in visual studio
express 2005

the insert comment is only good for a block of comment before sub, function

right now I would have to cut and do transform with another C editor before
copying and pasting back

Author
5 Nov 2006 7:04 AM
Cor Ligthert [MVP]
GS,

I don't know if it is in the express versions, otherwise it are those
buttons with two black, three light blue lines and than 2 black lines, just
go with your mouse over your toolbar to see if it is there.

Cor


Show quoteHide quote
"GS" <gsmsnews.microsoft.co***@msnews.Nomail.com> schreef in bericht
news:emUlqIKAHHA.4472@TK2MSFTNGP03.phx.gbl...
> how can one quickly comment out a block of selected code in visual studio
> express 2005
>
> the insert comment is only good for a block of comment before sub,
> function
>
> right now I would have to cut and do transform with another C editor
> before
> copying and pasting back
>
>
Author
5 Nov 2006 2:10 PM
Oenone
GS wrote:
> how can one quickly comment out a block of selected code in visual
> studio express 2005
>

Try selecting the code, then pressing Ctrl+K and then Ctrl+C. This should
add a comment to the start of every highlighted line. To remove the
comments, select the block once again and press Ctrl+K and then Ctrl+U.
Sadly there is no "block comment" such as C's /* */ in VB, so this is as
good as it gets.

HTH,

--

(O)enone
Author
12 Nov 2006 12:26 AM
GS
Good answers.  thank you.both

Show quoteHide quote
"Oenone" <oen***@nowhere.com> wrote in message
news:Rhm3h.3850$GX2.381@newsfe7-gui.ntli.net...
> GS wrote:
> > how can one quickly comment out a block of selected code in visual
> > studio express 2005
> >
>
> Try selecting the code, then pressing Ctrl+K and then Ctrl+C. This should
> add a comment to the start of every highlighted line. To remove the
> comments, select the block once again and press Ctrl+K and then Ctrl+U.
> Sadly there is no "block comment" such as C's /* */ in VB, so this is as
> good as it gets.
>
> HTH,
>
> --
>
> (O)enone
>
>