WEB开发网
开发学院软件开发C语言 C# 语法练习(2): 字符转义 阅读

C# 语法练习(2): 字符转义

 2009-02-23 08:17:08 来源:WEB开发网   
核心提示:' " a  f U u v x本例效果图:代码:using System;class MyClass{static void Main(){Console.WriteLine(""");Console.WriteLine("

' " a  f U u v x

本例效果图:

C# 语法练习(2): 字符转义

代码:

using System;

class MyClass
{
  static void Main()
  {
    Console.WriteLine(""");
    Console.WriteLine("u0022");
    Console.WriteLine(@"u0022");

    Console.WriteLine();

    Console.WriteLine("'");
    Console.WriteLine("'");
    Console.WriteLine("u0027");

    Console.WriteLine();

    Console.WriteLine("");
    Console.WriteLine("u005C");
    Console.WriteLine(@"");

    Console.WriteLine();

    Console.WriteLine("C:WindowsTemp");
    Console.WriteLine(@"C:WindowsTemp");
    Console.WriteLine(@"C:WindowsTemp");

    Console.WriteLine();

    Console.WriteLine("u4E07u4E00");
    Console.WriteLine("x4E07x4E00");
    Console.WriteLine("U00004E07U00004E00");

    Console.WriteLine();

    Console.WriteLine("u0041u0042u0043");
    Console.WriteLine("x0041x0042x0043");
    Console.WriteLine("x41x42x43");

    Console.ReadKey();
  }
}

Tags:语法 练习 字符

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接