Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I get copy/paste functionality from a C# Console Window?

I am developing a console application in C#, and was wondering if there was a way to get the "copy-paste" or "mark-paste" functionality into my application, similar or identical to that of the standard Windows command prompt. Is this a wild goose chase or a simple application variable?

like image 344
Simpleton Avatar asked Feb 05 '10 20:02

Simpleton


People also ask

How do I enable copy and paste function?

To enable copy-paste from the Command Prompt, open the app from the search bar then right-click at the top of the window. Click Properties, check the box for Use Ctrl+Shift+C/V as Copy/Paste, and hit OK. Click the magnifying glass icon in the bottom left corner of your screen.

How do I get my copy and paste?

Double-click the text you want to copy, or highlight it. With the text highlighted, press Ctrl + C to copy. Move your cursor to the appropriate location and press Ctrl + V to paste.

How do I copy and paste from a virtual machine?

Highlight the text in the VM, and then press Ctrl+C two times to copy the text. On your local computer, click where you want to paste the text. Press Ctrl+V or right-click and select Paste.

Is it command C to copy?

Keyboard Command: Control (Ctrl) + C The COPY command is used for just that - it copies the text or image you have selected and stores is on your virtual clipboard, until it is overwritten by the next "cut" or "copy" command.


1 Answers

I've copied text from the Console window and pasted it into another source many times.

It's there as default in a Console application;

Right click the console border:

Step 1

Select Edit > Mark:

Step 2

Drag over the text you want using the mouse (Or use the arrow keys) to select the text you want:

Step 3

Again, right click on the console border and select Edit > Copy:

Step 4

From here you can paste it into another application as you would with any other text.

This was taken from a C# Console application and the only code entered was the command to write to the console, no settings were changed.

Hope this helps!

like image 163
Jamie Keeling Avatar answered Sep 28 '22 03:09

Jamie Keeling