borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Next Topic (sort numeric array) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : Highest lowest number in array
Poster Message
Fatboy58
Level: Trainee

Registered: 14-01-2008
Posts: 3

icon Highest lowest number in array

vb 2005.net code

I have this code to find the highest number, but I also need one to find the lowest number.



Sub Highest()
      

Dim H As Integer

    H=Array(0)

        For IndexH As Integer = 1 To UBound(array)
            If  H < array(IndexH) Then
                H = array(IndexH)
            End If
        Next
        Label_highest.Text = H
    End Sub

14-01-2008 at 10:59 AM
View Profile Send Email to User Show All Posts | Quote Reply
stickleprojects
Level: Moderator


Registered: 09-09-2002
Posts: 961
icon Re: Highest lowest number in array

Eh?

    

Dim H As Integer

    H=Array(0)

        For IndexH As Integer = 1 To UBound(array)
            If  H > array(IndexH) Then
                H = array(IndexH)
            End If
        Next
        Label_lowest.Text = H



____________________________
Build it better, faster, quicker, easier.. then fix it (non-offical MS mission statement)

14-01-2008 at 12:43 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : Highest lowest number in array
Next Topic (sort numeric array) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2008 Andrea Tincaniborder