如何在C#控制台应用程序中输出Windows Alt键码 [英] How to output windows Alt keycodes in a C# console app

查看:152
本文介绍了如何在C#控制台应用程序中输出Windows Alt键码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用Console.WriteLine()将Windows Alt键代码输出到C#控制台应用程序中的控制台?

How can I output Windows Alt key codes to the console in a C# console app using Console.WriteLine()?

我想输出诸如用于创建框的字符之类的字符. 我可以在命令提示符下通过按住alt并键入适当的数字(例如Alt + 205,Alt + 187等)手动进行操作.

I would like to output characters such as those used for creating boxes. I can do so manually in a command prompt by holding alt and typing in the appropriate number such as Alt+205, Alt+187, etc.

谢谢

推荐答案

我想最简单的方法是将它们直接包含在源代码中的字符串文字中:

I suppose the easiest way would be to include them directly in your string literals within your source code:

Console.WriteLine("═╗");

这篇关于如何在C#控制台应用程序中输出Windows Alt键码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆