ArrayExt.cs 391 B

12345678910111213
  1. namespace Quadarax.Foundation.Core.Value.Extensions
  2. {
  3. public static class ArrayExt
  4. {
  5. public static int IndexOf<TValue>(this TValue[] owner,TValue findValue, int startIndex, int endIndex)
  6. {
  7. for(int i = startIndex; i < endIndex; i++)
  8. if (Equals(owner[i], findValue))
  9. return i;
  10. return -1;
  11. }
  12. }
  13. }