I\'ve a situation where I need to check whether multiple variables are having same data such as
var x=1; var y=1; var z=1;
I want to check
Slight variation on the excellent answer given by jevakallio above. See if myValue is equal to any of the values in a list (in the array):
if (new[] { 10, 11, 12 }.Any(x => x == myValue))