469,331 Members | 4,277 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,331 developers. It's quick & easy.

how to get the greatest value in array?

Hi,

i have an array like x(1), x(2) ... x(10).
Is there a simple way to get the greatest value?

Thanks
Eric
Oct 21 '08 #1
4 2481
hi ,
sort it
and take the last one :D

bye

"Eric" <er*@sdsclem.powrote in message
news:Oc**************@TK2MSFTNGP03.phx.gbl...
Hi,

i have an array like x(1), x(2) ... x(10).
Is there a simple way to get the greatest value?

Thanks
Eric
Oct 21 '08 #2
Can you use the SortedList which use (key,value) pair
It sort by Keys and the get either enumarator to move
Hope that help
Nicolas

"Eric" wrote:
Hi,

i have an array like x(1), x(2) ... x(10).
Is there a simple way to get the greatest value?

Thanks
Eric
Oct 21 '08 #3
"Eric" <er*@sdsclem.poschrieb
Hi,

i have an array like x(1), x(2) ... x(10). Is there a simple way to
get the greatest value?
Framework 3.5:

x.Max()
Armin
Oct 21 '08 #4
Thanks all

"Armin Zingler" <az*******@freenet.deschreef in bericht
news:ul**************@TK2MSFTNGP05.phx.gbl...
"Eric" <er*@sdsclem.poschrieb
>Hi,

i have an array like x(1), x(2) ... x(10). Is there a simple way to
get the greatest value?

Framework 3.5:

x.Max()
Armin

Oct 21 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by zaceti | last post: by
8 posts views Thread by Mike Nolan | last post: by
2 posts views Thread by Shark | last post: by
2 posts views Thread by Marv Arnold | last post: by
21 posts views Thread by Frederick Gotham | last post: by
35 posts views Thread by aarklon | last post: by
reply views Thread by zhoujie | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.