Results 1 to 18 of 18

Thread: [RESOLVED] Reversing Numbers

Threaded View

  1. #16
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: Reversing Numbers

    let's make your function an actual function first:
    VB Code:
    1. Private Function sortNum(ByVal Frame_order As String) As String
    2.  
    3.         Dim Frame_temp() As String = Frame_order.Split(" "c)
    4.  
    5.         Dim upperBound As Integer = Frame_temp.GetUpperBound(0)
    6.  
    7.         Dim No_Of_Mem(upperBound) As Integer
    8.  
    9.         For i As Integer = 0 To upperBound Step 1
    10.             No_Of_Mem(i) = Integer.Parse(Frame_temp(i))
    11.         Next i
    12.  
    13.         Array.Sort(No_Of_Mem, Frame_temp) 'Sort ascending.
    14.         'Array.Reverse(Frame_temp) 'Sort descending.
    15.  
    16.         Return String.Join(" ", Frame_temp)
    17.        
    18.     End Function
    Last edited by JuggaloBrotha; Feb 13th, 2007 at 08:27 PM.
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width