Check out example codes for "how to check if an integer is in array c#". It will help you in understanding the concepts better.

Code Example 1

//Add necessary namespace
using System.Linq;
//Example
string[] printer = {"jupiter", "neptune", "pangea", "mercury", "sonic"};
//using .Contains() method
if(printer.Contains("jupiter"))
{
    Process.Start("BLAH BLAH CODE TO ADD PRINTER VIA WINDOWS EXEC"");
}

Learn ReactJs, React Native from akashmittal.com