TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
anndy smaals
NA
24
4.3k
splitting string into array of strings
Dec 14 2018 2:04 PM
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();
}
}
}
Reply
Answers (
3
)
Delete from database using datagrid
assigning to array