How to get Min and max from this array of string using uipath

Hi , Experts…

I have array of string strArray= { “sanket”, “13”, “12”, “Rahul”, “1”}
Now I want to find min and max from above array … Using UiPath Studio

Hi @Mr.Sanket

Welcome to UiPath community
To get the maximum value from a array of strings
Use this expression

Yourarrayvariable.Max.ToString

And for minimum value

Yourarrayvariable.Min.ToString

Hope it helps

Hi,

Can you try the following expression?

Max

strArray.Where(Function(s) Double.TryParse(s,New Double)).Max(Function(s) Double.Parse(s))

Min

strArray.Where(Function(s) Double.TryParse(s,New Double)).Min(Function(s) Double.Parse(s))

Regards,

2 Likes

Not work it’s giving me word as highest

Thank You So much Yolchi.
It works​:hugs::blush::pray:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.