views:

53

answers:

2

Is it possible to duplicate a line in Visual Studio 2005? I briefly had ReSharper installed and then I used CTRL+D.

What I liked was that it didn't put that line into the clipboard memory.

+2  A: 

There isn't a built-in command (afaik), but Christophe Herreman explains how to create a macro to do it here: "Duplicate line command for Visual Studio"

gkrogers
A: 

I was looking for a solution as well. A quick keyboard shortcut that will work on every IDE on Windows will be to use the HOME, END trick.

Move cursor to end of the line (Press End)
Press Shift+Home to highlight current line
Press Ctrl + C to copy
Press End.  Press Enter
Press Ctrl + V to paste.
Yada
LOLThanks, hadn't thought about that. ;)
David Andersson
How about some love with an upvote. :)
Yada