(我今天开始学习数组。)编辑:我意识到=正引起错误,因为它被视为“相等时比较”与“分配此值”。
我看不到引用行中的哪个部分导致了错误:
'Option 1
Var citylistDE(5) as string
citylistDE(0) ="Genf"
citylistDE(1)="Lausanne"
citylistDE(2)="Bern"
citylistDE(3)="Basel"
citylistDE(4)="Zürich"
citylistDE(5)="St.Gallen"
dim countDe as Integer = citylistDE.LastRowIndex
for i as integer = 0 to countDe
de.Value = de.Value = citylistDE(i) + EndOfLine '<=== THIS LINE ?
next
'Option2
var citylistFR() as string = array("Genève", "Lausanne", "Berne", "Bale", "Zurich", "Sant-Gall")
dim countFR as integer = citylistFR.LastRowIndex
for i as integer = 0 to countFR
fr.Value = fr.Value + citylistFR(i) + EndOFLine
next
答案 0 :(得分:0)
我发现了错误。它是de.Value和citylistDE之间的=。 我将其从=更改为+。
de.Value = de.Value = citylistDE(i) + EndOfLine
next
to
de.Value = de.Value + citylistDE(i) + EndOfLine
next