I have the following problem. After the splitting I would like to get the author, title and booktype into variables like this.
string author = George Orwell
string title = Animal Farm
string booktype = novel
It's easy to print them out with a foreach loop but how do I get the values? Hope anyone can help me.
static void Main(string[] args)
{
string[] book = new string[12];
book[0] = "George Orwell###Animal Farm###Novel###";
string value = book[0];
string[] item = Regex.Split(value, "###");
foreach (string newItem in item)
{
Console.WriteLine(newItem);
}
// prints out just fine
// George Orwell
// Animal Farm
// Novel
Console.ReadKey();
}