Below i want to split the string and find the longest word
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp15
{
class Program
{
static void Main(string[] args)
{
string lyric = "We've come a long long way together";
string[] words;
string longestWord;
words = lyric.Split(' ');
longestWord = lyric;
Console.WriteLine("There are " + words.Length + " words, and the longest is " + longestWord);
Console.ReadLine();
}
}
}