static void Main(string[] args) { var words = Counter.CountWords("This is the longest string I've ever written!"); Console.WriteLine("The longest string you've ever written is {0} words long!", words); Console.ReadLine(); }
static void Main(string[] args) { Counter taco1 = new Counter{}; taco1.CountWords("taco taco burrito burrito"); Console.WriteLine(taco1.NumberOfWords); Console.ReadLine(); }
static void Main(string[] args) { Counter taco1 = new Counter { }; taco1.CountWords("taco taco burrito burrito"); Console.WriteLine(taco1.NumberOfWords); Console.ReadLine(); }