namespace Ch03Ex01
{
class Program
{
static void Main(string[] args)
{
int myInteger;
string myString;
myString = @"\myInteger\ is \n";
myInteger = 18;
Console.WriteLine("{1} {0}.", myInteger, myString);
Console.ReadKey();
}
}
{
class Program
{
static void Main(string[] args)
{
int myInteger;
string myString;
myString = @"\myInteger\ is \n";
myInteger = 18;
Console.WriteLine("{1} {0}.", myInteger, myString);
Console.ReadKey();
}
}
}
输出显示的是
\myInteger\ is \n 18
@是专门用来搞“\”字符中的反斜杠的!!!