473,406 Members | 2,713 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,406 software developers and data experts.

Issue of paramarray

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
2 1691
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
Cor
Only you did use the name Peter there, what is this?
Jul 21 '05 #3

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

Similar topics

0
by: Cort | last post by:
I have a project that I am trying to upgrade that uses VB6 components and ASP. I have gotten to the point when I have been able to upgrade the project to VB.NET, compile and register it for use by...
2
by: Edlueze | last post by:
Greetings: I have two functions and I would like to pass the ParamArray gathered from one function to the other function. For the purposes of this post, let's say that they are calculating...
2
by: Bruno Miousse | last post by:
I am trying to invoke a COM component (written in VB6) which accepts parameter of ParamArray data type. What would be the proper syntax in C# for passing ParamArray in VB6? Thanks.
8
by: Tubs | last post by:
I know it might seem weird but i have a need to pass the contents of a paramarray from one sub to another that also takes a paramarray. Problem is i want to pass it exactly as it came in to the...
6
by: Peter | last post by:
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...
0
by: djpirra | last post by:
Hi, I managed to create a Shared Add-in in Vs.net 2003 and create all the menus, UDFS and all that.... The only 2 problems i am having now are: 1 - The formulas seems to work only at second...
2
by: Tom | last post by:
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...
0
ADezii
by: ADezii | last post by:
Generally, the number of Arguments in a Procedure Call must be the same as in the Procedure Specification. If a Procedure requires 3 Arguments in its Specification, when calling the Procedure you...
3
mafaisal
by: mafaisal | last post by:
End of parameter list expected. Cannot define parameters after a paramarray parameter. Public Sub F_Bind(ByVal StrSql As String, ByVal ParamArray Ctrls() As Object,Optional ByVal Row as Integer...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.