0

我怎样才能复制这个代码只改变一个或两个变量?

Public Class Form1
    Dim ArrayFS(1, 196, 7) 
    Dim Customer(1, 196) As StreamWriter 
    Dim Profit As Decimal  
    Dim selectedIndex As Integer '
    Dim CustomerLoad(1, 196) As StreamReader

Private Sub BtnSave_Click(sender As System.Object, e As System.EventArgs) Handles BtnSave.Click
Dim Row As Integer = ChkLstRowA.SelectedIndex
        Select Case Row
            Case 0
                Customer(0, 0) = New StreamWriter("G:\theater seats\friday\A1Seat.txt")
                Customer(0, 0).Write(ArrayFS(0, 0, 0) & (" ") & ArrayFS(0, 0, 1) & (", ") & ArrayFS(0, 0, 2) & (", ") & ArrayFS(0, 0, 3) & (", ") & ArrayFS(0, 0, 4) & (", ") & ArrayFS(0, 0, 5) & (", ") & ArrayFS(0, 0, 6) & (", ") & ArrayFS(0, 0, 7))
                MsgBox("Data has been stored.")
                Customer(0, 0).Close()
        End Select
  End Sub
End Class
4

0 回答 0