3) 查询 XML

怎么样,有没有想试一下的冲动,把LINQPad下载到你的爱机吧
LoongTsui 按:
软件实现主要使用的技术代码(动态代码执行):
关于此特别补充了一篇,见:1. public bool Compile(IEnumerable<string> references, string source, string outputFile) 2. { 3. // ... 省略部分 4. Dictionary<string, string> dictionary = new Dictionary<string, string>(); 5. dictionary.Add("CompilerVersion", "v3.5"); 6. CSharpCodeProvider provider = new CSharpCodeProvider(dictionary); 7. CompilerParameters options = new CompilerParameters(Enumerable.ToArray<string>(references), outputFile, true); 8. options.TreatWarningsAsErrors = false; 9. options.GenerateExecutable = false; 10. options.IncludeDebugInformation = true; 11. CompilerResults results = provider.CompileAssemblyFromSource(options, new string[] { source }); 12. // ... 省略部分:定位编译错误
动态执行C#代码