I am supposed to count the number of methods in a class of any .NET program. For this I am making use of the il of that particular program. Initially I thought that I would count the number of "ret" in the il. But then I found out that even method declarations consists of the "ret" keyword. Then I tried to go with "callvirt". But this would not work in all the cases. Now I am thinking about something like this :-
Count the number of times the following appears in the il:- end of method class_name::method_name
but i don't know how to implement this (I am a complete newbie to .NET)
Can you kindly suggest an alternate way to identify a method in a class by making use of the il?