Method IndexOf
IndexOf(string)
Returns the index of the first occurance of the given letter. If the letter is not present in the word, -1 is returned.
public int IndexOf(string letter)Parameters
- letterstring
- The letter to search for. 
Returns
- int
- The index of the letter, or -1 if it is not in the word. 
IndexOf(Word)
Returns the index of the first occurance of the given letter. If the letter is not present in the word, -1 is returned.
public int IndexOf(Word word)Parameters
- wordWord
- The letter to search for. 
Returns
- int
- The index of the letter, or -1 if it is not in the word.