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
Sweta Sinha
NA
51
42.2k
Search a string within a string
Mar 2 2015 1:52 AM
Hi,
I have a search box and want to search a string from a string.i.e,
Suppose, str[]= abf,fghi,acb,stabu
and if I search for "ab",then it should display "abf" and "stabu"
My Code:-
List<string> selectedValues = new List<string>();
foreach (string str in completeList)
{
if(str.Contains(filterWith)) //filterWith is the sequence of characters to be searched
selectedValues.Add(str);
}
Reply
Answers (
7
)
selected item from comboBox in store app
Add items to the listbox in Windows Phone application