Creating an array by a sub RRS feed

  • Question

  • Hey there,

    I want to create an array using a sub. After that, that sub is called by an other sub.

    In VB6, verything is ok. But in MVS2010 is not Ok.

    Code is below.

    Please give help.

    Public Class Form1
        Public Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim b(1 To 100) As Double
            Dim m As Integer, j As Integer
            m = 5
            Call MakeNewArray(m, b())
            For j = 1 To m
            Next (j)
        End Sub

        Private Sub MakeNewArray(ByVal n As Integer, ByRef a() As Double)
            Dim i As Integer
            For i = 1 To n
                a(i) = i ^ 0.5
            Next i
        End Sub
    End Class 

    Monday, July 9, 2018 10:06 AM

All replies