Dim filtered = array.GroupBy( Function(x) x.Split("#")(0) ) _ .Select( Function(x) Return x.OrderByDescending(Function(y) Int32.Parse(y.Split("#")(1))) _ .First() End Function ).ToArray()
GroupBy
x.Split("#")(0)
#
Group 0: "100#200#0" "100#560#0" "100#-320#0" "100#-290#0" Group 1: "200#120#0" "200#780#0" Group 2: "300#980#0" Group 3: "400#220#0" Group 4: "500#400#0" Group 5: "600#450#0"
x
x.OrderByDescending
Function(y) Int32.Parse(y.Split("#")(1))
.First()
"100#560#0" "200#780#0" "300#980#0" "400#220#0" "500#400#0" "600#450#0"
IEnumerable
IEnumerable (Of String)
ToArray
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)