开发者

How to type a grave accent/ back tick in a Visual Studio Console?

开发者 https://www.devze.com 2023-03-11 10:48 出处:网络
I need to type a back tick character in a Visual Studio 2010 开发者_高级运维Console but I can\'t seem to make it happen. I know it is the Unicode character +0060, and I tried the Alt+ method but that

I need to type a back tick character in a Visual Studio 2010 开发者_高级运维Console but I can't seem to make it happen. I know it is the Unicode character +0060, and I tried the Alt+ method but that didn't work; after some research I added this line to my C# application but it still doesn't let me type it: Console.OutputEncoding = System.Text.Encoding.UTF8

Is there a simple way to make it appear? I am using the Lucida Console font. Thanks!


ALT-096 (96 decimal = 0060 in hex) should normally work, I have a vague memory from back in the DOS days of it having to be the Alt-Gr key and the numbers must be typed on the number pad but that certainly not the case on my setup here, unless that something keyboard specific.

An alternative technique is to run the charmap.exe windows accessory (you may have to install it from Add Programs/Programs and Features if it wasn't selected at original install but it is available in every windows installation that I've come across since Win 3.x days). From that you can easily copy characters in the clipboard buffer and paste in to whatever you need.

Charmap.exe is especially useful for dealing with symbol/wingdings type fonts.

The final approach I know of is to simply use '(char) 96', a char, have you tried;

Console.Write((char) 96);
0

精彩评论

暂无评论...
验证码 换一张
取 消