int IDuser = 100; int[] IDUserkey = { 94, 96, 98, 100 }; if (! IDUserkey.Contains(IDuser)) { // ID User is not present // your code here..... } else { // ID User is present }
using System.Linq;
bool result = IDUserkey.Contains( IDuser);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)