System::Array::LastIndexOf method

Array::LastIndexOf(const ArrayPtr<ArrayType>&, const ValueType&, int, int) method

Determines the index of the last occurrence of the specified item in a range of items of the array specified by the start index and the number of elements in the range.

template<typename ArrayType,typename ValueType> static int System::Array<T>::LastIndexOf(const ArrayPtr<ArrayType> &arr, const ValueType &value, int startIndex, int count)
ParameterDescription
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array
ParameterTypeDescription
arrconst ArrayPtr<ArrayType>&Array to search the specified item in
valueconst ValueType&Item index of which is to be determined
startIndexintIndex at which the search is started
countintNumber of elements of the range to search in

ReturnValue

Index of the last occurrence of the specified item if the item is found, otherwise -1

See Also

Array::LastIndexOf(const ArrayPtr<ArrayType>&, const ValueType&) method

Determines the index of the last occurrence of the specified item in the array.

template<typename ArrayType,typename ValueType> static int System::Array<T>::LastIndexOf(const ArrayPtr<ArrayType> &items, const ValueType &value)
ParameterDescription
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array
ParameterTypeDescription
itemsconst ArrayPtr<ArrayType>&Array to search the specified item in
valueconst ValueType&Item index of which is to be determined

ReturnValue

Index of the last occurrence of the specified item if the item is found, otherwise -1

See Also

Array::LastIndexOf(const ArrayPtr<ArrayType>&, const ValueType&, int) method

Determines the index of the last occurrence of the specified item in the array starting from the specified index.

template<typename ArrayType,typename ValueType> static int System::Array<T>::LastIndexOf(const ArrayPtr<ArrayType> &items, const ValueType &value, int startIndex)
ParameterDescription
ArrayTypeType of elements in the target array
ValueTypetype of the item to search for in the array
ParameterTypeDescription
itemsconst ArrayPtr<ArrayType>&Array to search the specified item in
valueconst ValueType&Item index of which is to be determined
startIndexintIndex at which the search is started

ReturnValue

Index of the last occurrence of the specified item if the item is found, otherwise -1

See Also