我可以从 C# 控制台窗口获得复制/粘贴功能吗?

Can I get copy/paste functionality from a C# Console Window?(我可以从 C# 控制台窗口获得复制/粘贴功能吗?)
本文介绍了我可以从 C# 控制台窗口获得复制/粘贴功能吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 C# 开发一个控制台应用程序,并且想知道是否有一种方法可以将复制粘贴"或标记粘贴"功能添加到我的应用程序中,类似于或等同于标准 Windows 命令提示符.这是白痴还是简单的应用程序变量?

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?

推荐答案

感谢 Sean 让我意识到这个问题完全是白痴.让我成为其他人的榜样,不要跳上结论的火车.

Thank you Sean for making me realize the complete idiocy of this question. Let me be an example to others to not jump on the conclusion train.

Sean 指出可以使用 cmd.exe 的内置功能完成复制粘贴",这让我认识到,是的,绝对是的,当您在 Windows 中运行命令行应用程序时,它已经具有此功能.

Sean pointed out that "copy-paste can be done using cmd.exe's built-in functionality", making me recognize that, yes, absolutely duh, when you run your command line application in Windows it already has this functionality available.

我错误地得出结论,因为我是通过 IDE 使用 DEBUG 执行进行所有初始测试,而 vshost 没有为您提供该功能.

I erred by jumping to conclusions, for I was doing all my initial testing with the DEBUG execution through the IDE, and vshost does not give you that functionality.

一个快速的不调试就开始"暴露了我的短视.

A quick "Start Without Debugging" revealed my short-sightedness.

这篇关于我可以从 C# 控制台窗口获得复制/粘贴功能吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

DispatcherQueue null when trying to update Ui property in ViewModel(尝试更新ViewModel中的Ui属性时DispatcherQueue为空)
Drawing over all windows on multiple monitors(在多个监视器上绘制所有窗口)
Programmatically show the desktop(以编程方式显示桌面)
c# Generic Setlt;Tgt; implementation to access objects by type(按类型访问对象的C#泛型集实现)
InvalidOperationException When using Context Injection in ASP.Net Core(在ASP.NET核心中使用上下文注入时发生InvalidOperationException)
LINQ many-to-many relationship, how to write a correct WHERE clause?(LINQ多对多关系,如何写一个正确的WHERE子句?)