Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to check if an integer is in array c#

//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"");
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #integer #array
ADD COMMENT
Topic
Name
4+2 =