如果问题有点乏味,我深表歉意,但我想做的是从“R1”、“R2”、“R3”等文本文件中访问内容列表。我是否可以将该名称中的整数作为单独的变量?
所以如果我有...
Dim R0 As String = "Hello"
Dim R1 As String = "Goodbye"
Dim RCount As Integer = 0
MsgBox(R & RCount) 'Returns Hello
并非没有创建和评估Expression Tree,但您可以使用数组和数组的索引。
Dim R(6) as String
R(0) = "Hello"
R(1) = "Goodbye"
Dim RCount as Integer = 0
MsgBox(R(RCount))