TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dinesh Santhalingam
NA
737
368.5k
Get the array element in between a string in c#
Jan 19 2017 1:24 AM
I have the String Array.The array contains following.
String []
Array=
{"Age18" ,"Ram","Raj" ,"Sonu","Mano","
Age
20","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"
};
}
Help me to solve this.
Reply
Answers (
8
)
download link not work in webview
How to get string array value to existing list c# ?