Madam Zu Zu
Madam Zu Zu

Reputation: 6605

Find index of item within the array by value?

I am trying to find the index of an item in a classic asp array. i get how it's possible with looping, but is there something else i can use? indexOf() or something along those lines? i can't seem to find anything online

Upvotes: 1

Views: 1317

Answers (1)

Tom Swifty
Tom Swifty

Reputation: 2962

Is it an array of strings, or some other type of objects?

For standard data types you can use Array.BinarySearch(myArray, searchString), but you have to sort the array first.

Upvotes: 1

Related Questions