public void CheckAnother(RepeatCounter newRepeat) { Console.Write("Enter the word you'd like to count:"); string newUserWord = Console.ReadLine(); newRepeat.UserWord = newUserWord; newRepeat.WordCount = 0; newRepeat.CountWord(); newRepeat.Results(newRepeat); }
public static void InitApp() { Console.Clear(); Console.Write("Please enter a sentence:"); string userString = Console.ReadLine(); Console.Write("Enter the word you'd like to count:"); string userWord = Console.ReadLine(); RepeatCounter newRepeat = new RepeatCounter(userString, userWord); newRepeat.CountWord(); newRepeat.Results(newRepeat); }