How to get all indices of more than one list elements' type?

Hi Does someone know how i can get all indicies of two or more list elements’ type? With List.AllindicesOf can only one elements’ be searched, right?

List.AllIndicesOf returns indices of all occurrences
List.FirstIndexOf returns the first occurrence
In your case List.AllIndicesOf should work

Thank for your response!

But my problem is to return all indices of more elements type. For example for list [2,2,3,4,5,6,7,7,3,3,3], i want to return all indices of element 2 and 3 to one list result at same time

is that what you are looking for?

for number type i think you are right, but what if i want to search for string? :rofl:

for strings, use String.AllIndicesO

sorry i think i don’t make it clear, but i tried it in your way, something is still wrong…


:man_facepalming: :+1: :+1: :+1: :+1: :+1: