473,508 Members | 2,213 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reflection to query non-referenced assembly

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
3 1435
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
You can load the assembly by location

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

Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1971
by: Brian Loesgen | last post by:
The next San Diego .Net User Group meeting is Tuesday, November 25, 2003 at the Scripps Ranch Library. Scripps Ranch Library 10301 Scripps Lake Drive San Diego, CA 92131-1026 Please join us...
2
1333
by: danny van elsen | last post by:
hello all, in my application, I want to save the state of a number of classes to disk: what would be the best way to do this? right now, I'm hard coding the fields of the classes, but of course...
7
4143
by: sujit | last post by:
Hi All, I have query regarding "C++ and Reflection". I could not get sufficient information from net on this topic. Does C++ support reflection or any features similar to some other languages...
2
864
by: Jason Coyne Gaijin42 | last post by:
I have seen several people looking for a way to access the Columns collection when using the AutoGenerate = true option. Some people have gotten so far as to find the private autoGenColumnsArray...
4
3195
by: Picho | last post by:
Hi all, Using reflection, I can invoke/call private methods of an object. is this intended? if yes, why? in what scenario (example would be good) should I be givven the option to use...
1
24184
by: Mudassar | last post by:
i want to get the property value using reflection. Scenerio: i have a status bar on MDI form. it has property named "Panels" and i want to get a specific panel from that panels collection using...
5
6792
by: rettigcd | last post by:
I have several classes that all have the same static member: class A{ public static string Table = "TableA"; } class B{ public static string Table = "TableB"; }
6
2781
by: Andrew Robinson | last post by:
assuming that I have a class public class MyClass { public string FirstName { get {...} set {...} } } how can I assign the FirstName property using reflection on a generic class
5
1380
by: DesCF | last post by:
What exactly is Reflection ? I've looked at the definition in Help but I don't find it very helpful! I just stare at it blankly and can't quite seem to grasp its meaning conceptually. Reflection...
1
1689
by: John Bode | last post by:
I need a way to fake reflection in C++ code that makes as few assumptions about the data types involved as possible. I suspect there is no good answer for what I need to do, but I'll present the...
0
7231
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7336
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7063
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7504
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
4720
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1568
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
773
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
432
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.