Removing part of an array
So currently I have the following code
public static void ReadSuburbs()
{
String directory = @"C:\Address Sorting\";
string[] linesA = new string[5]
{
"41 Boundary Rd",
"93 Boswell Terrace",
"4/100 Lockrose St",
"32 Williams Ave",
"27 scribbly gum st sunnybank hills"
};
int found = 0;
foreach (string s in linesA)
{
found = s.IndexOf("st");
Console.WriteLine(s.Substring(found + 3));
}
}
Currently I get the following result
Boundary Rd
Boswell Terrace
100 Lockrose St
Williams Ave
sunnybank hills
I was wondering if there was a way that I could, instead of removing characters, remove the first three words. For example if I have an array
string[] linesA = new string[5]
{
"41 Boundary Rd",
"93 Boswell Terrace",
"4/100 Lockrose St",
"32 Williams Ave",
"27 scribbly gum st sunnybank hills"
};
I want to remove every first three words in this array which will leave me with this as a result if i print to console.
st sunnybank hills