C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




Max/Min values


Posted Date: 17 Jun 2008    Resource Type: Code Snippets    Category: Collections

Posted By: Sarfraz Ahmad       Member Level: Silver
Rating:     Points: 10



' Our form is not a server-side form so we need to
' re-populate the text box with the passed in values.

values.Value = strValues

' Create a array of strings from the input.
arrStrValues = Split(strValues, ",")

' Size our new array of integers.
ReDim arrIntValues(arrStrValues.GetUpperBound(0))

' Transfer data from our string array to our int array.
' Otherwise data would be sorted by text so that 100
' would be less then 90 because 1 is smaller then 9.
For I = LBound(arrStrValues) To UBound(arrStrValues)
If IsNumeric(arrStrValues(I)) Then
arrIntValues(I) = CInt(arrStrValues(I))
End If
Next

' Pass integer arrays to the sorting functions.
litMin.Text = Min(arrIntValues)
litMax.Text = Max(arrIntValues)




Responses


No responses found. Be the first to respond and make money from revenue sharing program.

Feedbacks      
Popular Tags   What are tags ?   Search Tags  
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to get the Assembly Version of an executable file for Emulators in PocketPC Device Emulators
Previous Resource: Hashtable - basic operations
Return to Discussion Resource Index
Post New Resource
Category: Collections


Post resources and earn money!
 
Related Resources



dotNet Slackers   BizTalk Adaptors    Web Design

SPOC

Contact Us    Privacy Policy    Terms Of Use