Hi, another possibility:
if (Array.IndexOf(new int[] { 1, 5, 7, 9 }, x) >= 0) {
//...
}
If you store the array in some field it would be shorter (and more efficient when called often):
//somewhere in your class
private int[] _goodNumbers = new int[] { 1, 5, 7, 9 };
//your method
if (Array.IndexOf(_goodNumbers, x) >= 0) {
//...
}
Robert