Function AddElements(ByVal ary1() As Double, ByVal ary2() As Double) As Double() Dim aryreturn(ary1.length - 1) As Double For i = 0 To ary1.length - 1 aryreturn(i) = ary1(i) + ary2(i) Next i Return aryreturn End Function
Function AddValue(ByVal ary1() As Double, ByVal value As Double) As Double() Return (From e In ary1 Select e + value).ToArray End Function