Greetings,
I have an array that stores words and their equivalent phonetically sounding codes as strings like this:
1:abat
12:abash
134:abridge
What I want to do is split each string and store the code only, so basically I want to store everything prior to the ":" .
I've wrote the following code
foreach (string intvalue in total)
{
string[] storage =intvalue.Split(':');
}
But this stores the code and the corresponding word underneath on the next line. I want the program to ignore everything after and including the ":", but I just cant find a way to articulate my needs. Any help is greatly appreciated, thanks.