Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private bool CheckIndexAndValue(int index, int value)
  2. {
  3. if (index == 0 && value < this[index + 1])
  4. {
  5. return true;
  6. }
  7.  
  8. else if (value > this[index - 1] &&
  9. (index == Count || value < this[index + 1]))
  10. {
  11. return true;
  12. }
  13.  
  14. else if (value > this[index - 1] &&
  15. (index == Count || value < this[index]))
  16. {
  17. return true;
  18. }
  19.  
  20. return false;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement