分离源变量和参数

时间:2017-06-25 04:57:07

标签: vb.net

我遇到子参数更改源变量的问题。

Public LEDScripts(9, 9, 9, 27) As List(Of LEDStructure)    
Sub DoWork(x As Integer, y As Integer, nowChain As Integer)
    Dim nowQue = LEDScripts(nowChain, x, y, LED_Index(nowChain, x, y)) 'Copy data from global variable.

    PrepareToQueue(nowQue) ' Call 'PrePareToQueue' method with a list of scripts to be runned.
End Sub

Private Sub PrepareToQueue(LEDList As List(Of LEDStructure))


    Dim ToBeRemoved As New List(Of LEDStructure)
    ToBeRemoved.Add(LEDList(0))
    ToBeRemoved.Add(LEDList(1))
    For Each tmpItem In ToBeRemoved
        LEDList.Remove(tmpItem) 'When it works, <Public LEDScripts(,,,)> changes!
    Next
End Sub

我如何分开 LEDListLEDScripts(,,,)
我正在使用VS 2017,也许这是Visual Basic 2017的一个错误。?
+我也试过“ByVal”

0 个答案:

没有答案