Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to check if a value is inside an array c#

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