當你還使用For…Each循環或者是For
IEnumerator界面支持兩種方法和一種特性
下面的程序顯示了這三種計算集合的可能的辦法
Dim testCollection As New Collection()
Dim collectionItem As String
Dim loopCounter As Integer Dim enumCollection As Ienumerator
With testCollection
End With
For Each collectionItem In testCollection
Console
Next
For loopCounter =
Console
Next
enumCollection = testCollection
Do While enumCollection
Console
Loop
IEnumerator帶給你For…Each技術所能提供的計數功能
From:http://tw.wingwit.com/Article/program/net/201311/12842.html