It would be more useful if you passed numbers to your function. I used 2 NumericUpDown controls to get the numbers.
The result should be visible in the immediate window.
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim Idk() As Integer = SolveMath(NumericUpDown1.Value, NumericUpDown2.Value)
For Each i In Idk
Debug.Print(i.ToString)
Next
End Sub
Private Function SolveMath(Num1 As Integer, Num2 As Integer) As Integer() 'You are returning an array so add the ()
Dim Result1 As Integer = Num1 + Num2
Dim Result2 As Integer = Num2 - Num1
'You can initialize an array easily by putting comma separated values of the correct type in braces.
Dim ResultsList() = {Result1, Result2}
Return ResultsList
End Function
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…