zoukankan      html  css  js  c++  java
  • 字符串转义字符

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace ConsoleProgamming
    {
        class Program
        {
            static void Main(string[] args)
            {
                //string s = ""ab"";     "ab"
                //string s = "a b"; //n:newline     a
                                                                 //b
                //string s = "a\b";     a
                //string s = "c: emp\fasdf\ddaa\1.jpg";   c:      empfasdfdda1.jpg
                //string s = "\\";    \
               // string s = @"\\"; //字符串中的字符不当成转义符      \\
                //string s = @"c: empfasdfddaa1.jpg";          c: empfasdfddaa1.jpg
               // string s = @""ab""; //错误,@只对转义符有意义
                Console.WriteLine(s);

                //转义符只针对在代码中直接写出的字符串,对于程序中直接读出来字符串没有这个问题

                Console.ReadKey();
            }
        }
    }

  • 相关阅读:
    python 基础2
    ffmpeg安装和录制linux桌面图像
    Python TCP Socket 传输服务器资源信息(C/S)
    ubuntu下,hue3.7编译安装,设置中文语言
    Python 图片转字符画
    Python快速教程
    spark安装部署
    python基础之文件处理
    python之路之函数
    python习题
  • 原文地址:https://www.cnblogs.com/lcyuhe/p/3747724.html
Copyright © 2011-2022 走看看