I have the String Array.The array contains following.
- String [] Array= {"Age18" ,"Ram","Raj" ,"Sonu","Mano","Age20","Ana","Einstein","Somu"};
Now here I want to separate the String between Age 18 and Age 20.
- foreach (string line in Array)
- {
- if (line.Contains("Age18"))
- {
- //Want to print the Elements of an array before Age20.
- //result [] array={"Age18" ,"Ram","Raj" ,"Sonu","Mano"};
- }

JohnRank #2,322 · 608 reputationPosted Jan 18, 2017, 8:36 PM EST
JohnRank #2,322 · 608 reputationPosted Jan 18, 2017, 9:24 PM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 18, 2017, 8:55 PM EST
Vasanti