473,385 Members | 1,615 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,385 software developers and data experts.

InvokeMember problem

I have a problem using InvokeMember. I have a client application that
loads a set of assemblies runtime. It creates instances of them and
calls a method which I specify in a XML file.

What I'm calling:
t.InvokeMember(widget.InitMethod, BindingFlags.DeclaredOnly
|BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance |
BindingFlags.InvokeMethod, null, newWidget, widget.Parameters);

What I have:
newWidget is a object of the class WSlider. WSlider has a method called
InitSlider(int,int,int).
widget.Parameters is a object array which holds 3 int values.
widget.InitMethod holds "InitSlider".
Now, this just throws me a MissingMethodException. It works fine with
one parameter, but as soon as I add more it throws the exception. Anyone
got a clue on this?
Nov 17 '05 #1
0 1020

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

Similar topics

0
by: Jared Hagel | last post by:
I can't use Type.InvokeMember(...) on a remote object. But when I use Type.InvokeMember(...) on a non-remote object in the exact same way, I don't have a problem. Does someone know what I'm...
0
by: Alex Zhitlenok | last post by:
Hi, On Google, one can find a lot of statements that Invoke and InvokeMemeber work alike. However, my own experience contradicts this statement. 1. Surprisingly, Invoke and InvokeMember methods...
1
by: Rein Petersen | last post by:
Hi All, I'm invoking Type.InvokeMember() on a COM class (via COMInterop) through a generalized interface. However, each specialized instance (of the COMInterop generic interface) requires...
3
by: Laurent | last post by:
Hello, I'm having a problem trying to call a DLL assembly from a C# code with some special parameters. I have a global class used to store some parameters and work with them: public class...
0
by: Pat Ireland | last post by:
I continue to investigate issues with making explicit InvokeMember calls (necessary when dynamically loading classes). My quest lets me use a simple class to invoke another class's member method...
3
by: Patrick Ireland | last post by:
I am dynamically loading a class. One of the methods of the class takes a short * (by reference) argument. However, the InvokeMember call used to invoke the method of the class passings arguments...
3
by: Pat Ireland | last post by:
The following code shows what I am trying to do. The normal invocation of the CalcByRef produces the correct results, however, using the InvokeMember fails to correctly pass the single argument by...
4
by: Howard Kaikow | last post by:
I am trying to retrive some WMI properties using Option Strict On. This requires the use of InvokeMember. I know that there are alternative ways to get the values, but I want to learn how to...
1
by: tommyk | last post by:
I am writing a small program that reads a text file filled with a large number of IP addresses and attempts to add them to IIS so that they will be blocked. For some reason, about one in every...
0
by: Cliff | last post by:
All, I'm not new to C# but I am new to the concept of calling a member using Interop. I can access 1 function and properties in an external dll no problem....but I can't understand how I'm...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.