SelfPrint.cs
public text v1 · immutableusing System;
class Program
{
static void Main()
{
string[] texts = new string[]
{
"using System;",
"class Program",
"{",
" static void Main()",
" {",
" string[] texts = new string[]",
" {",
" };",
" int i = 0;",
" foreach (string text in texts)",
" {",
" Console.WriteLine(text);",
" i++;",
" if (i == 7)",
" {",
" foreach (string item in texts)",
" {",
" string s = item.Replace(\"\\\\\", \"\\\\\\\\\");",
" s = s.Replace(\"\\\"\", \"\\\\\\\"\");",
" s = \" \\\"\" + s + \"\\\",\";",
" Console.WriteLine(s);",
" }",
" }",
" }",
" }",
"}",
};
int i = 0;
foreach (string text in texts)
{
Console.WriteLine(text);
i++;
if (i == 7)
{
foreach (string item in texts)
{
string s = item.Replace("\\", "\\\\");
s = s.Replace("\"", "\\\"");
s = " \"" + s + "\",";
Console.WriteLine(s);
}
}
}
}
}