I have an array of objects that'll be used for some process.
var x = new List<MyObject>() { new MyObject(), new MyObject(), ... }.ToArray();
After the process, it returns an array of results corresponding to each of the input objects.
var y = MyProcess(x); // returns List<MyResult>
Now, my question is how can I query a list of results with a given condition and the corresponding input objects?
For example, if y[2].IsOkay
is false
, I want to obtain both x[2]
and y[2]
in another array.
And the objects in array x and y don't have a reference key except the index.