Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

how to know if an element is in an array c#

string[] names = "John", "Susan", "Sophie";
if (names.Contains("John") //Using Contains you can know if a specific value is on an array
    {
    Console.WriteLine("John is a name");
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #element #array
ADD COMMENT
Topic
Name
9+6 =