Search code examples
c#keyaltconsole.writeline

How to output windows Alt keycodes in a C# console app


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

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.

Thanks


Solution

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

    Console.WriteLine("═╗");