sorting

  • (2 Pages)
  • +
  • 1
  • 2

15 Replies - 3923 Views - Last Post: 17 March 2013 - 08:14 AM Rate Topic: -----

#16 CodingSup3rnatur@l-360  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 992
  • View blog
  • Posts: 972
  • Joined: 30-September 10

Re: sorting

Posted 17 March 2013 - 08:14 AM

A for-each loop is just syntactic sugar to make life easier for us. An interesting fact about the for-each loop when used with arrays is that the compiler translates the for-each loop into something resembling the for-loop IronRazer posted:

For i As Integer = 0 To splitstring.Length - 1
    Dim word As String = splitstring(i)
    'do what you need to with 'word'
Next i



Interestingly, I don't think that's mentioned in the language specification, but is how the compiler currently handles it, as an optimization for arrays.

This post has been edited by CodingSup3rnatur@l-360: 17 March 2013 - 08:23 AM

Was This Post Helpful? 1
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2