如何处理转义字符

来源:互联网 发布:最赚钱的软件 编辑:程序博客网 时间:2024/05/02 04:49

 ///如何处理转义字符
namespace CSharp开发经验技巧宝典
{
    class _042
    {
        //static void Main(String[] args)
        //{
        //    //在这里/'就相当于/u0027
        //    string str = "hywork/"angle";
        //    string hy = "hywork/u0022angle";
        //    Console.WriteLine("str = " + str);
        //    Console.WriteLine("hy = " + hy);
        //    /*
        //     * 常见的转义序列列表如下
        //     * 转义序列           产生的字符             字符的Unicode值
        //     *    /'                单引号                    0x0027
        //     *    /"                双引号                    0x0022
        //     *    //                反斜杠                    0x005C
        //     *    /0                空                        0x0000
        //     *    /r                回车                      0x000D
        //     */
        //}
    }
}