Note: this article only applies to conversions to VB.NET.
You can transform While…Wend loops – which are leftovers from early Visual Basic versions – into more modern Do While loops using a PostProcess pragma. VB Migration Partner converts the Wend keyword into “End While”, therefore we must look for this latter keyword, and we also need to account for Exit While statements:
Notice however that this transformation doesn’t really improve your code readability or execution speed; nevertheless it concurs to “modernize” the look of your code. Also, after the conversion into a Do…Loop block you can apply a couple of optimization, as explained in this article.