You can use a helper function with variable arguments to make the comparison pretty easy.
static bool CompareLongList(params int[] args) { if (args.Length > 1) { int value = args[0]; for (int i = 1; i < args.Length; ++i) { if (value != args[i]) return false; } } return true; }
Then you just use the function as follows
if(CompareLongList(a,b,c,d,e,f,j,h,i,j,k)) {
source share