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

can i pass integer array to methodInfo.invoke

Hi,

Can i pass integer array to methodInfo.Invoke(obj,args()). I am able to
pass only string array to this function. This is the code i have written.

Dim myType As Type = objClass.GetType()
Dim myMethod As MethodInfo = myType.GetMethod("strFnName")
myMethod.Invoke(objClass, Args)

here "strFnName" is the function name and args() is the string array. args()
is the parameter list for that function. I am not able to pass any integer
array to that function.

can anyone help me out in this regard.

Regards,
Sivaraman.S
Nov 21 '05 #1
1 2178
Try Boxing the integer

Dim o as Object
Dim i as Integer
o=i

--

OHM ( Terry Burns )
. . . One-Handed-Man . . .
If U Need My Email ,Ask Me

Time flies when you don't know what you're doing

"Sivaraman.S" <Si********@discussions.microsoft.com> wrote in message
news:D6**********************************@microsof t.com...
Hi,

Can i pass integer array to methodInfo.Invoke(obj,args()). I am able to
pass only string array to this function. This is the code i have written.

Dim myType As Type = objClass.GetType()
Dim myMethod As MethodInfo = myType.GetMethod("strFnName")
myMethod.Invoke(objClass, Args)

here "strFnName" is the function name and args() is the string array. args() is the parameter list for that function. I am not able to pass any integer
array to that function.

can anyone help me out in this regard.

Regards,
Sivaraman.S

Nov 21 '05 #2

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

Similar topics

4
by: KC Eric | last post by:
Hi all, I have a dll file, it has a class, say: class Temp, this class has a function which has a delegate as a parameter, say: public void Test(GameOverHandler _overHandler)
3
by: trevorelbourne | last post by:
Hi, I am having trouble accessing the elements of an array using reflection. This is the code I am having trouble with: FieldInfo Fields = Obj.GetType().GetFields(); foreach (FieldInfo fi in...
14
by: stic | last post by:
Hi, I'm in a middle of writing something like 'exception handler wraper' for a set of different methodes. The case is that I have ca. 40 methods form web servicem, with different return values...
2
by: Fredrik Strandberg | last post by:
I have not been able to find the solution of this problem anywhere: I am building a class PrivateHelper that provides methods to access private members and invoke private methods, to be used for...
1
by: John F | last post by:
Hello, I'm dynamically loading a child form saved in a DLL. I have this code working and it's pretty straightforward. What I'd like to do is pass an object type to an invoked method in the...
3
by: Lambuz | last post by:
Hi all, when I use MethosInfo.Invoke method I obtain a TargetInvocationException where inner exception is +{"classBase.OpenConn cannot be invoked directly" } System.Exception. I'm using the...
0
by: pso19 | last post by:
Hi, I am trying to access all the properties, methods of an assembly using reflection. But what i want to do is invoke a method which contains custom parametrs like enumeration defined in a...
15
by: =?Utf-8?B?VG9tIENvcmNvcmFu?= | last post by:
I've been led to believe by several articles, particularly Eric Gunnerson's C# Calling Code Dynamically, that calling a method dynamically through Reflection was much slower than through a...
7
by: Henri.Chinasque | last post by:
Hi all, I've tried searching for this one, but can't seem to come up with the proper terms. I want to know how to pass a type to a generic method. Something like this: public void...
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: 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
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...
0
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
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...

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.