Catatan Kecilku

Try to Out of The Box

Mengurutkan teks dengan List (of T) pada VB.Net


Buat form seperti berikut:

Gambar

Klik 2x pada button List (of T), lalu masukkan:

Dim arr As New List(Of Char)
For Each huruf As Char In TextBox1.Text
arr.Add(huruf)
Next
arr.Sort()
For Each urut As Char In arr
TextBox2.Text = TextBox2.Text + urut
Next

Tinggalkan komentar

Information

This entry was posted on 28 Februari 2014 by in Sorting, source code, vb.net and tagged , , .
blog-indonesia.com
free counters
IP

Arsip