是反射命名空间编写C#中的奎因的构建块?
-
26-09-2019 - |
题
我是否需要使用反射来写C#中的奎因程序? 我在别处读 - 奎因从磁盘打开源文件“作弊” 所以我想使用.NET反射器和/或使用System.IO是一劈打开源文件。
有没有比使用反射,我应该考虑其他的其他方式。
解决方案
其实你不需要反射或其他任何东西做一个奎因,只是一个小串manipluation和一定的时间。
using System;
class Q
{
static void Main()
{
string s = "using System;class Q{2}static void Main(){2}string s ={1}{0}{1};
Console.Write(string.Format(s, s, (char)34, (char)123, (char)125));{3}{3}";
Console.Write(string.Format(s, s, (char)34, (char)123, (char)125));
}
}
不隶属于 StackOverflow