Thank you, thats good to know. I will change my code to do it this way. Best regards Florian
On 25 Mai, 10:06, Jb Evain <[email protected]> wrote: > Hi, > > On Wed, May 25, 2011 at 8:52 AM, Florian <[email protected]> wrote: > > Maybe I got GetMemberReferences() wrong. I am trying to write a tool > > for searching through the members of an assembly. > > Oh then GetMemberReferences is not appropriate. Let say you have an > assembly foo.dll which contains: > > public class Library { > public static void Print (string s) { Console.WriteLine (s); } > > } > > If you open foo.dll, GetMemberReferences will yield a reference to > Console.WriteLine, as foo.dll references it. You want to iterate over > the .Types collection on the module, this will yield Library, then you > can iterate over its different Fields, Methods, Properties, etc. > collections. > > Jb -- -- mono-cecil
