0
我有一个数组填充了24个数字我想所有的数字要加在一起,然后显示在文本框中。这是我为这个数组创建的代码。但我不确定如何将数组中的所有数字一起添加。感谢您的时间。在数组中添加所有数字
'Calculating distances
Dim Game As String
Game = txtGameAdd.Text
SystemValueGame = SystemValueGame + 1
TotalGames(SystemValueGame) = Game
txtGameAdd.Text = ""
txtGameAdd.Focus()
'Keeping count with lables'
lblAmountNum.Text = SystemValueGame
'Double Checking SystemValue'
If SystemValueGame = 24 Then
'notify when array is full'
MsgBox("Entered Max Amount Of Surnames", MsgBoxStyle.Information)
txtGameAdd.Text = " "
txtGameAdd.Enabled = False
End If
尝试使用[For Each](https://docs.microsoft.com/en-us/dotnet/visual-basic/language-reference/statements/for-each-next-statement) –
什么是数组? – ZAhmed
该数组是TotalGames – jdavies