LINQ and Lambda Expressions - Designer - Foundation 23.2 - Foundation 23.2 - Ready - Hyland RPA - external

Hyland RPA Designer

Platform
Hyland RPA
Product
Designer
Release
Foundation 23.2
License
  • The following code returns the first list item that matches "Meyer"

    myString = myList.Find(Function(x) x.Equals("Meyer")) 
    
  • The following code returns the first list item that contains "Meyer" or "Mayer"

    myString = myList.Find(Function(x) x.Contains("Meyer") OR x.Contains("Mayer")) 
    
  • The following code returns a sorted list ordered in ascending order by the first column and then by the second column

    mySortedList = myUnsortedList.OrderBy(Function(x) x(0).ThenBy(Function(x) x(1)).ToList() 
  • The following code returns a sorted dictionary ordered by the highest to the lowest value

    mySortedDictionary = myDictionary.OrderByDescending(Function(x) x.value).ToDictionary(Function(x) x.Key, Function(x) x.Value)