Difference between revisions of "CheckWordIsValid"
(Created page with "<syntaxhighlight lang=csharp> private static bool CheckWordIsValid(string Word, List<string> AllowedWords) { bool ValidWord = false; in...") |
(No difference)
|
Revision as of 12:52, 14 November 2017
private static bool CheckWordIsValid(string Word, List<string> AllowedWords)
{
bool ValidWord = false;
int Count = 0;
while (Count < AllowedWords.Count && !ValidWord)
{
if (AllowedWords[Count] == Word)
{
ValidWord = true;
}
Count++;
}
return ValidWord;
}