我有一个列表视图框,有5列,最多25行。我想从中导出数据。我在这里的代码效果很好:
Dim rtb As New RichTextBox
rtb.AppendText("Gen, Juv, Adult, Senile, Total" & vbNewLine)
For Each BitofData As ListViewItem In Results.ModelData.Items
rtb.AppendText(
BitofData.Text & "," &
BitofData.SubItems(1).Text & "," &
BitofData.SubItems(2).Text & "," &
BitofData.SubItems(3).Text & "," &
BitofData.SubItems(4).Text & vbNewLine)
Next
rtb.SaveFile(Address, RichTextBoxStreamType.PlainText)
但是如何将其作为另一种迭代形式编写。例如,for循环或while循环??