I’m trying to find the index of the first element of an ArrayList whose ‘tag’ property does not equal null.
I thought I could do something to the effect of
ArrayList.IndexOf(p => p.tag != null);
or
ArrayList.IndexOf(*.tag != null);
but neither of these work. Is there a way to use IndexOf with just a property of an object?
Try
Array.FindIndex: