我怎样写逃脱字符'\'代码 [英] How do I write the escape char '\' to code
本文介绍了我怎样写逃脱字符'\'代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何在C#编写转义字符 \
?
How can I write in C# the escape character \
?
我不能让谷歌明白我要问...
I couldn't make Google understand what I'm asking...
推荐答案
您只需要进行转义:
char c = '\\';
或者你可以使用Unicode转义序列:
Or you could use the Unicode escape sequence:
char c = '\u005c';
请参阅我的文章串所有字符串/字符文字提供的各种转义序列。
See my article on strings for all the various escape sequences available in string/character literals.
这篇关于我怎样写逃脱字符'\'代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文