Click here to Skip to main content
15,888,325 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all !!!

i have made a function to return multiple values.
VB
Public Function ReturnMultiple() As List(Of String)
       Dim Sol As New List(Of String)
        Sol.Add("A")
        Sol.Add("B")
       return Sol

it's working fine but i have no idea how to access these values. i want to pass these values to another function.
say the function is func(ByVal ans1 as String ,ByVal ans2 as String)

how to pass values from list to this function??
Posted

1 solution

Try:
VB
Dim MyList as List(Of String) = ReturnMultiple()
func(MyList(0), MyList(1))
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900