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

Code Example 1

/*Make sure to add 
using System.Linq;
*/


string[] printer = {"jupiter", "neptune", "pangea", "mercury", "sonic"};
if(printer.Contains("jupiter"))
{
    Process.Start("BLAH BLAH CODE TO ADD PRINTER VIA WINDOWS EXEC"");
}

Learn ReactJs, React Native from akashmittal.com