how to remove spaces in the array
try that StrArray.Trim
or Split(" ".ToCharArray)
you can do this easily if you convert the array to a List.
ListVariable = ArrayName.ToList()
now, use a For Each loop to access each element of the list to check for spaces.
If you want to remove leading and trailing spaces in the elements that already have a value, use of for each loop is ideal to check each individually.
If you want to remove elements that are empty or blank, that can also be done through invoke method activity by calling RemoveAll method.
Hope it helps
arrVar = arrVar.Select(Function(s) s.Replace(" ",string.Empty)).ToArray()
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.