473,382 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Getting a list of constuctors and methods using reflection

Dear All,

I am trying to use the Assembly.Load method to read a dll off the file
system and list the constuctor plus methods. I have found the
assembly.GetTypes method but that doesn't really offer me what I am
l;ooking for. Can anybody help?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
3 1536
Christopher,

Once you call GetTypes, it gives you an array of Types that are in the
assembly. When you have that, you can call the GetConstructor and
GetMethods methods on each Type to get the constructor and all the method
info for each type.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"christopher green" <us************@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
Dear All,

I am trying to use the Assembly.Load method to read a dll off the file
system and list the constuctor plus methods. I have found the
assembly.GetTypes method but that doesn't really offer me what I am
l;ooking for. Can anybody help?

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
christopher green <us************@yahoo.com> wrote:
I am trying to use the Assembly.Load method to read a dll off the file
system and list the constuctor plus methods. I have found the
assembly.GetTypes method but that doesn't really offer me what I am
l;ooking for. Can anybody help?


Use assembly.GetTypes() to get the types, then Type.GetMethods(),
Type.GetContructors() etc to get the rest.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #3
Thanks for your help guys, thats got me started

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

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

Similar topics

4
by: JH | last post by:
Fairly new to c# so please forgive any simple oversights. I'm developing a console app that loads dll assemblies at run time. The app scans a "plugin" directory for these dlls. Each dll is loaded...
1
by: Dave Wurtz | last post by:
All, Is it possible to get all of the current namespaces that are available through reflection? What I am trying to do is get back all of the namespaces, then classes within the namespaces,...
9
by: Don | last post by:
Say I have a class like so: Public Class MyClass Public Prop1 as Integer Public Prop2 As Integer Public Prop3 As Integer End Class Is it possible to retrieve a list of the variables or...
3
by: Andrew Ducker | last post by:
I have a class with a DataTable built into it. Various places subscribe to the DataTable.RowChanging event. I want to grab a list of all the subscribers. Normally I'd use GetInvocationList,...
3
by: ImOk | last post by:
In Smalltalk I can get the list of the classes, methods and global variables by querrying a global dictionary. In addition you can get the arguments. I know in PHP one can get the list of...
4
by: Cedric Rogers | last post by:
I wasn't sure if I could do this. I believe I am stretching the capability of what generics can do for me but here goes. I have a generic delegate defined as public delegate bool...
4
by: Toze | last post by:
I'm using a assembly to load my apllication (ex: Mobi.exe), and now I need to list all forms in my apllication and list all controls (ex: txtname;btnname) inside of each form.
5
by: JS | last post by:
There are 2 features that I keep wishing C# had. These are not groundbreaking ideas, and I haven't given these too much thought, but I wonder if others have also wanted these types of language...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.