I need to take a number and re-arrange it to the biggest possible number

for example: input 6859, output 9865

I've googled and googled but i can't figure out a way to change characters in a chararray vb .net just says: Property 'chars' is 'readonly'

are there any alternatives?

Try this:

Dim ary(TextBox1.Text.Length - 1) As String
        For x As Int16 = 0 To TextBox1.Text.Length - 1
            ary(x) = TextBox1.Text.Substring(x, 1)
        Next
        Array.Sort(ary)
        Array.Reverse(ary)
        TextBox2.Text = ""
        For x As Int16 = 0 To UBound(ary)
            TextBox2.Text &= ary(x)
        Next
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.