Код: Выделить всё
return listOfObjects[Index].param1 == "test1" && listOfObjects[Index].param2 == "test2" ? listOfObjects[Index] : null;
Подробнее здесь: https://stackoverflow.com/questions/798 ... -from-list
Код: Выделить всё
return listOfObjects[Index].param1 == "test1" && listOfObjects[Index].param2 == "test2" ? listOfObjects[Index] : null;