Answers for "c# is in array"

C#
0

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");}
Posted by: Guest on January-16-2022

C# Answers by Framework

Browse Popular Code Answers by Language