Is it possible to do a For…Each Loop Backwards?

前端 未结 13 2194
没有蜡笔的小新
没有蜡笔的小新 2020-12-06 03:53

I don\'t believe this is possible by conventional methods, but something like this verbose code:

For Each s As String In myStringList Step -1
    //\' Do stu         


        
13条回答
  •  臣服心动
    2020-12-06 04:35

    Depending on what happens inside your loop you can do an .InsertAt(object,0) instead of an .Add and produce the same result as a reverse enumeration.

提交回复
热议问题