Hey Mike,
Ah, I didn't note the VB reference. Yes the struct or class object would be the best route. I was only trying to give another possibility to round out the options.
>In VB.NET, these are used like so (note the ByRef instead of ByVal):
>
>
>Sub Main
> Dim value1 As Integer = 1
> Dim value2 As Integer = 2
>
> FlipValues(value1, value2)
>
> 'value1 now equals 2
> 'value2 now equals 1
>End Sub
>
>Sub FlipValues(ByRef firstValue As Integer, ByRef secondValue As Integer)
> Dim tempValue As Integer = firstValue
> firstValue= secondValue
> secondValue= tempValue
>End Sub
>
>
>However, I would tend to agree with Paul that you should use a Structure. Like John said, a Function should return a single value. A Structure qualifies as a single value.
>
>>Hi Daniel,
>>
>>In addition to John and Paul's info, if you really need multiple return values, you can use "out" parameters.
>>
>>Bill
>>
>>>Hi All,
>>>
>>>I need to return 2 values from a VB.NET function. One is data type integer and the other string.
>>>What is the best approach to acomplish that?
>>>
>>>Thanks,
>>>Daniel
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.