c# is in array

63

c# is in array -

using System.Linq; //Then you can use linq Contains() method

string[] printer = {"jupiter", "neptune", "pangea", "mercury", "sonic"};
if(printer.Contains("jupiter"))
{Console.WriteLine("'jupiter' is in the array");}

Comments

Submit
0 Comments