In C#, instead of doing if(index == 7 || index == 8), is there a way to combine them? I\'m thinking of something like if(index == (7, 8)).
if(index == 7 || index == 8)
if(index == (7, 8))
Write your own extension methods so you can write
if (index.Between(7, 8)) {...}
where Between is defined as:
public static bool Between (this int a, int x, int y) { return a >= x && a <= y; }