Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
752 views
Welcome To Ask or Share your Answers For Others

1 Answer

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!


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...