Re: Dynamic cast with generics
Then yes, reflection may be your best bet. In this scenario I would
use GetType() and MakeGenericMethod to invoke the method (as above) so
that my reflection is limited to the invoke step, rather than
throughout.
Watch for wrap: <
http://msdn2.microsoft.com/en-us/library/
system.reflection.methodinfo.makegenericmethod(VS.80).aspx>
Marc
.
Relevant Pages
- Re: java - invoke
... You have stumbled on one of the most subtle features of Java called ... You create call lists of parameters on the fly and invoke methods. ... It is a tool to allow java code to use arbitrary class files handed to ... You can usually get what you want without resorting to reflection ... (comp.lang.java.help) - Re: How to query n web services
... When I added web references, I wrote 10 different web references name. ... and then invoke service01.someMethod... ... The subset is given by strings. ... Using Reflection, you can use a string to create an instance of an object and then invoke methods on that instance. ... (microsoft.public.dotnet.framework.aspnet.webservices) - Re: How can I detect the presense of an optional assembly and call a method within it?
... Basically you will need to use Reflection. ... allows you to dynamically create instances at runtime and invoke method. ... > 1- Read a configuration file where the client provides the assembly name ... > (DLL) and the ... (microsoft.public.dotnet.languages.csharp) - TransparentProxy and Reflection
... I'm using reflection to instantiate classes and then to invoke methods ... know the type at compile time, ... (microsoft.public.dotnet.framework) - Reflection Issues
... I"m trying to invoke a method using reflection on a DLL that is already ... Reflection in the past, so I'm familiar with Reflection a little bit. ... classes and assemblies are very complex to invoke, ... Any advice on trying to track ... (microsoft.public.dotnet.languages.csharp) |
|