This code split a string in seperate words.
using System;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string s = "This is a big house";
//Split string on spaces.
string[] wordsSplit = s.Split(' ');
foreach (string word in wordsSplit)
{
Console.WriteLine(word);
}
}
}
}
6 Kommentare zum Snippet