W
Woody Splawn
How would I pass an array back to a sub routine from a function? That is, I
have a function that looks like this
Public Function arrayTest() As Array
Dim states() As String = { _
"AZ", "CA", "WA" _
}
Return states
End Function
I have a button with code like this:
Dim states() As String
states = arrayTest()
However, I get a squiqqly under the "ArrayTest()" saying , "Option strict on
disallows implicit conversions from System.array to 1-demsional array of
string.
I would like to be able to write the states code once and have it called
from a variety of places. My first thought is to write it in a function,
and call the values when needed from the function. If this is the best way
of doing this, how do I do it and if not, what is better?
have a function that looks like this
Public Function arrayTest() As Array
Dim states() As String = { _
"AZ", "CA", "WA" _
}
Return states
End Function
I have a button with code like this:
Dim states() As String
states = arrayTest()
However, I get a squiqqly under the "ArrayTest()" saying , "Option strict on
disallows implicit conversions from System.array to 1-demsional array of
string.
I would like to be able to write the states code once and have it called
from a variety of places. My first thought is to write it in a function,
and call the values when needed from the function. If this is the best way
of doing this, how do I do it and if not, what is better?