By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,613 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,613 IT Pros & Developers. It's quick & easy.

Issue of paramarray

P: n/a
Tom
Hi everyone

In VB6,paramarray parameter is passed using byref,but in VB.NET,using byval.How can I get back the changed value of the paramarray parameter

My work case in vb.net like this
----------------------------------------------------
Function mytestmethod(paramarray byval arg() as object) as objec
arg(0)=1
arg(1)="abc
dim revalue as object="somevalue
return revalue
End Functio

Sub mycalling(
dim a as integer=6
dim b as string="xyz
dim r as objec
r=mytestmethod (a,b
msgbox (a
msgbox (b
End Su
----------------------------------------------------
the expected value of a,b is 12,"abc";but it remains 66 or "xyz"

Who can help me

Best regard

To

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Cor
Hi Tom,

You got a lot of answers in the VB language group.

Including mine.

Cor
-----------------------------------------------------
Function mytestmethod(paramarray byval arg() as object) as object
arg(0)=12
arg(1)="abc"
dim revalue as object="somevalue"
return revalue
End Function

Sub mycalling()
dim a as integer=66
dim b as string="xyz"
dim r as object
r=mytestmethod (a,b)
msgbox (a)
msgbox (b)
End Sub
-----------------------------------------------------

Jul 21 '05 #2

P: n/a
Cor
Only you did use the name Peter there, what is this?
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.