Find Methods in a c# File programmatically
- by sajad
Hi Friends,
I want to write a code to search for method defination and methods called in a c# file.
So obviously my pattern should search for text like
1.public void xyz(blahtype blahvalue);
2.string construct = SearchData(blahvalue);
Has anyone done similar to this, is Regex helpful in this case. if yes provide me the pattern.
Any other workarounds. I dont know reflection(will it help in my case)
Thanks, you guys gave it a try, i did not know this wud be so complex.
All i wanted to do was suppose i have method like this
public method1(int val)
{
method2();
method3();
}
void method2(int val2)
{
method4()
}
i wanted to construct a string as Method1:Method2:method4 and Method1:Method3....
I guess its really complex