Click here to Skip to main content
15,891,708 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: BUBBLE SORT Pin
Christian Graus9-Nov-09 17:18
protectorChristian Graus9-Nov-09 17:18 
GeneralRe: BUBBLE SORT Pin
_Damian S_9-Nov-09 17:22
professional_Damian S_9-Nov-09 17:22 
GeneralRe: BUBBLE SORT Pin
Christian Graus9-Nov-09 17:24
protectorChristian Graus9-Nov-09 17:24 
GeneralRe: BUBBLE SORT Pin
_Damian S_9-Nov-09 17:26
professional_Damian S_9-Nov-09 17:26 
GeneralRe: BUBBLE SORT Pin
Christian Graus9-Nov-09 17:29
protectorChristian Graus9-Nov-09 17:29 
GeneralRe: BUBBLE SORT Pin
The Man from U.N.C.L.E.9-Nov-09 22:22
The Man from U.N.C.L.E.9-Nov-09 22:22 
GeneralRe: BUBBLE SORT Pin
Mycroft Holmes9-Nov-09 21:19
professionalMycroft Holmes9-Nov-09 21:19 
GeneralRe: BUBBLE SORT Pin
nlarson119-Nov-09 17:21
nlarson119-Nov-09 17:21 
if your going to use a do and a for - then you need to make sure your not exceeding the size of the array. You can't compare if i+1 is greater then getupperbound(0). so you need to test for that.

if you use a for and a for then it will do it for you.

Dim sa() As String = {"a", "z", "e", "b", "j", "k", "o", "c", "d", "r", "n", "i", "t", "u", _
                      "m", "v", "g", "f", "p", "q", "h", "l", "s", "w", "y", "x"}
Dim Temp As String

For idx1 As Int16 = 0 To sa.GetUpperBound(0)
    For idx2 As Int16 = idx1 + 1 To sa.GetUpperBound(0)
        If sa(idx2) < sa(idx1) Then
            Temp = sa(idx1)
            sa(idx1) = sa(idx2)
            sa(idx2) = Temp
        End If
    Next
Next

For idx As Int16 = 0 To sa.GetUpperBound(0)
     Debug.Write(sa(idx))
Next

abcdefghijklmnopqrstuvwxyz


'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous

'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous


QuestionNow can i make a lot of threads of a same method? Pin
anonimo99999-Nov-09 11:48
anonimo99999-Nov-09 11:48 
AnswerRe: Now can i make a lot of threads of a same method? Pin
Dave Kreskowiak9-Nov-09 12:05
mveDave Kreskowiak9-Nov-09 12:05 
GeneralRe: Now can i make a lot of threads of a same method? Pin
anonimo99999-Nov-09 12:29
anonimo99999-Nov-09 12:29 
GeneralRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 12:43
sitebuilderLuc Pattyn9-Nov-09 12:43 
GeneralRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 13:23
sitebuilderLuc Pattyn9-Nov-09 13:23 
AnswerRe: Now can i make a lot of threads of a same method? Pin
Luc Pattyn9-Nov-09 12:38
sitebuilderLuc Pattyn9-Nov-09 12:38 
QuestionForm Sound. Pin
thebiostyle9-Nov-09 11:11
thebiostyle9-Nov-09 11:11 
AnswerRe: Form Sound. Pin
Dave Kreskowiak9-Nov-09 12:00
mveDave Kreskowiak9-Nov-09 12:00 
GeneralRe: Form Sound. Pin
thebiostyle9-Nov-09 12:18
thebiostyle9-Nov-09 12:18 
GeneralRe: Form Sound. Pin
EliottA10-Nov-09 2:06
EliottA10-Nov-09 2:06 
GeneralRe: Form Sound. Pin
Dave Kreskowiak10-Nov-09 3:31
mveDave Kreskowiak10-Nov-09 3:31 
QuestionKeyPress Sounds... Pin
thebiostyle9-Nov-09 10:00
thebiostyle9-Nov-09 10:00 
AnswerRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 10:25
mveDave Kreskowiak9-Nov-09 10:25 
GeneralRe: KeyPress Sounds... Pin
thebiostyle9-Nov-09 10:32
thebiostyle9-Nov-09 10:32 
GeneralRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 11:59
mveDave Kreskowiak9-Nov-09 11:59 
GeneralRe: KeyPress Sounds... Pin
thebiostyle9-Nov-09 12:19
thebiostyle9-Nov-09 12:19 
GeneralRe: KeyPress Sounds... Pin
Dave Kreskowiak9-Nov-09 15:39
mveDave Kreskowiak9-Nov-09 15:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.