A method returns and array, I need only and specific item of the array
var result() as integer = MethodReturnsArray()
' value needed is returned in array(0), for exemple
var theValue as integer
theValue = result(0) ' that's ok
' How to get theValue without defining the new variable: result?
theValue = MethodReturnsArray() 'normal error
theValue = MethodReturnsArray()(0) 'error
theValue = (MethodReturnsArray())(0) 'error
or, I’m comfused and is not possible to get only a specific item of the returned array?
3 posts - 3 participants