Skip to content

Instantly share code, notes, and snippets.

@aromig
Created January 25, 2016 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aromig/b31f12d37a9c5772bae4 to your computer and use it in GitHub Desktop.
Save aromig/b31f12d37a9c5772bae4 to your computer and use it in GitHub Desktop.
Check to see if a string exists in a string array
public static bool IsInArray(string[] array, string value)
{
foreach (string member in array)
{
if (member == value)
{
return true;
}
}
return false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment