By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,926 Members | 1,833 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,926 IT Pros & Developers. It's quick & easy.

Reflection to query non-referenced assembly

P: n/a
What do I need to do to get details of an assembly that is not
referenced by an app? I don't even know the classes contained in the
assembly.

If the assembly is referenced and I know the existing classes, I know
I can do:
System.Reflection.MemberInfo[] ClassMemberInfo =
typeof(SomeClass).GetMembers()

but suppose I don't know the classes and also am not referencing the
assembly? I'd like to be able to find all the public members of the
assembly.

Nov 16 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jimi wrote:
What do I need to do to get details of an assembly that is not
referenced by an app? I don't even know the classes contained in the
assembly.

If the assembly is referenced and I know the existing classes, I know
I can do:
System.Reflection.MemberInfo[] ClassMemberInfo =
typeof(SomeClass).GetMembers()

but suppose I don't know the classes and also am not referencing the
assembly? I'd like to be able to find all the public members of the
assembly.


The documentation for Assembly.GetTypes() has a sample showing exactly
what you need.

--
mikeb
Nov 16 '05 #2

P: n/a
You can load the assembly by location

Assembly assem = Assembly.LoadFrom("C:\\MyLibrary.dll");
Nov 16 '05 #3

P: n/a
Thanks!

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.