Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private bool CheckIndexAndValue(int index, int value)
- {
- if (index == 0 && value < this[index + 1])
- {
- return true;
- }
- else if (value > this[index - 1] &&
- (index == Count || value < this[index + 1]))
- {
- return true;
- }
- else if (value > this[index - 1] &&
- (index == Count || value < this[index]))
- {
- return true;
- }
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement