The Duplicate line tool is useful when you need to create similar lines in the code. For instance, you are going to declare a number of string fields. You can declare each field manually, but that will take too much time. The other method is to create a single declaration, and duplicate it with Duplicate Line. Place the cursor on the line to be duplicated, and press SHIFT+ENTER. CodeRush Classic will duplicate the line and select the field name in the new line.
Duplicates the declaration.
Duplicates an initialized field declaration (bringing the initialization to the new line).
Initialized Integer Field
Duplicates integer fields initialized to an integer value. The initialized value is incremented by one for the duplicated line.
Duplicates event declarations.
Duplicates method declarations when inside an interface.
Duplicates property declarations when inside an interface.
Duplicates using statements.
if (aa is bb)
Matches if-expressions checking to see if object ooo is of type ttt. Declares a new local variable of type ttt, initialized to ooo (typecast as ttt).
Duplicates an assignment statement.
Flagged Enum Element
Duplicates an initialized element of an enumeration, doubling the initialized value on the next line.
You can customize existing Duplicate Line templates and create new ones in the Duplicate Line page of CodeRush Classic Options.
We are updating the DevExpress product documentation website and this page is part of our new experience. During this transition period, product documentation remains available in our previous format at documentation.devexpress.com. Learn More...
Was this page helpful?
Thanks for your feedback! Any other suggestions? Tell us here.