473,385 Members | 1,927 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.

Is there any way to know whether a procesure parameter is paramarr

Using reflection, is there a way to know that a method or property parameter
is a paramarray? There doesn't seem to exist a property like 'IsParamArray'
in reflection.parameterinfo.

Thanks in advance.
Jul 21 '05 #1
2 1225
Yes, check the ParamArrayAttribute:
....
ParameterInfo[] Param = callMethod.GetParameters();
for(int i = 0; i < Param.Length; i++)
{
if(Attribute.IsDefined(Param[i], typeof(System.ParamArrayAttribute)))
Debug.Write(Param[i].Name + " is a paramarray");
}
Jul 21 '05 #2
Thank you, great help.
Jul 21 '05 #3

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

Similar topics

5
by: vishal | last post by:
Hi, I am writing my first script to execute a Oracle procedure through a unix script. Could you tell me how do I do error handling here? How do I know in my script if the procedure executed...
10
by: Eitan | last post by:
Hello, I want to know, wheter an asp (that call itself in "get" method, has passed any parameter to itself). i.e : in the asp : test_asp.asp : ..... <html> <body>
2
by: Dan | last post by:
How does one do this?
2
by: Ben Taylor | last post by:
Hi, I am writing a program that uses different threads to handle various painting operations, I wondered if somebody could possible tell me if I create a new thread using...
2
by: David Krussow | last post by:
The 2nd parameter of the method controls whether a persistent cookie is created - so that ASP.NET can "know" if the current user has been previously authenticated (during previous browser...
11
by: ItsMe | last post by:
Hi, I've 50 MDI Forms in my project, so trying to create MDI Child Form from this procedure. But the problem is, unable to declare as "NewFormName". It gives me an error. Is there any other...
4
by: Rodger Dusatko | last post by:
After entering the sql statement da.deletecommand.commandtext = "Delete from Users where username = @username" I set the parameter to the username I wish to delete. This successfully deletes the...
2
by: buzzy | last post by:
Using reflection, is there a way to know that a method or property parameter is a paramarray? There doesn't seem to exist a property like 'IsParamArray' in reflection.parameterinfo. Thanks in...
1
by: yuchang | last post by:
Hi, Using the FormView control is very efficient. But I want to do some action,like showing a success message or redirect to another page, after inserting, updating and deleting. How do I get...
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
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,...

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.