jeudi 12 février 2015

Using Expressions to read the code [duplicate]


This question already has an answer here:




I am trying to read the contents of the c# code written inside a class file by writing another c# code. For example,



public static int GetValue()
{
int tempValue = 10;
return tempValue * 5;
}


is the code present in my class. I can get the available classes and the methods under those classes using Reflection. But I am not able to get the expression to find the logic inside the method. Is there any way to do it?


thanks Vignesh






Aucun commentaire:

Enregistrer un commentaire