Reflecting Parameters

I got a question last week from a gentleman asking how to tell what parameters were available for a particular method.  This is useful when you know that a method will be available on a class you are calling, but the method could have any parameters, or when you have used reflection to get the list of methods in your class, and need to pull out the parameter list for each.

The solution is actually quite simple:

(more…)

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

Monday, May 5th, 2008

Reflection From a DLL and Serialization

Last week, we finished up our main series on reflection.  For most people, what we covered is all they will ever need.  However, there are a few other things I’ve needed to know due mainly to the fact that I was using reflection from a DLL instead of an EXE

When I wrote VSS.NET, which was my first .NET application, allow Visual SourceSafe to be used over the Internet, I wanted to implement the SCC api.  This is the API that allows you to use VSS from the IDE.  For some reason that I can’t remember now and isn’t important to this discussion, I needed to use reflection from the DLL that the SCC interface was calling.  This posed two problems.

(more…)

Wednesday, April 30th, 2008

Reflection and Interfaces

Today is the last official installment in the series on reflection.  If you’ve been following along, you’ve probably notice that calling code in other classes using reflection is a huge pain in the butt.

(more…)

Wednesday, April 23rd, 2008