+ 1
Printing string (word) from a sentence.
Can I print any word from a sentence using array in C# programming. If possible what will be the code? I am a new programmer. Need help from experts.
1 Answer
+ 5
string s="these are words";
string[] sentence= s.Split(" ");
forEach(string word in sentence)
{
console.WriteLine(word);
}