Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c sharp type in word and calculate how much a letter is inside that word

public static int countLetters(string word, string countableLetters)
{
    int count = 0;
    foreach (char c in word)
    {
        if(countableLetters.Contains(c))
           count++;
    }
    return count;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #sharp #type #word #calculate #letter #word
ADD COMMENT
Topic
Name
9+2 =