Sort Integer Array

  • Thread starter Thread starter Bob Palank
  • Start date Start date
B

Bob Palank

' Given

Dim v(19) As Integer ' a 20 element array

Dim vSorted(19) As Integer

Dim i As Integer

' The array v() is filled with random numbers

' It is then copied into vSorted()

then

Array.Sort(vSorted) ' is attempted but it seems to be a string sort

' and not a numeric sort.

' So in vb.net 2008, how does one code a numeric sort ?

BR

Bob
 
It works for me. I suggest you run in the debugger with breakpoints before
and after Array.Sort(vSorted) and see what is happening.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top