C#程序可以打印其自己的代码的一部分吗? [英] Can C# program print parts of its own code ?
本文介绍了C#程序可以打印其自己的代码的一部分吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的所有人,
我有一个程序(用C#编写,但是我认为语言不是很重要).在该程序中,我有一种方法可以进行一些计算.如果我的程序可以将该方法的实际代码以文本形式保存在某个地方(请在某些文本文件中说),我会感到非常高兴.
有可能吗?
预先感谢.
Dear all,
I have a program (written in C#, but I think the language is not really important). And in that program I have one method which does some computation. I would be vary happy if my program could save the actual code of that method in a form of text somewhere (let say in some text file).
Is that possible ?
Thanks in advance.
推荐答案
是的.这是可能的.
这是一个开源项目,它在C#中也是如此.因此,请从此处获取所需的逻辑
http://code.msdn.microsoft.com/LINQ-Sample-Queries-13a42a54
Yes. Its possible.
Here is a open source project which does the same and its in C#. So get the required logic from here
http://code.msdn.microsoft.com/LINQ-Sample-Queries-13a42a54
这篇关于C#程序可以打印其自己的代码的一部分吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文