While Removing a Certain Range of elements from a List of Strings

I am trying to Remove starting 3 elements from a list of strings. I am using the syntax
:mystring.RemoveRange(0,3)

Where 0 is my index and 3 is the range
mylist is a variable of type - Systems.Collections.Generic.List.<System.String>

But I am getting the error - Expression does not produce a value.

hi,

RemoveRange has no output : List<T>.RemoveRange(Int32, Int32) Méthode (System.Collections.Generic) | Microsoft Learn

Therefore you cannot assign its output to a variable AFAIK.

But you can use it in a Invoke Code activity

Can you please tell me how to put value of index and range

take a look

after executing this code, list becomes “value1, value4”

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