Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
7
Reply
Search a string within a string
Sweta Sinha
Mar 2 2015 1:52 AM
647
Reply
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);
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
7
)
Next Recommended Forum
Get the child element of stackpanel in Windows Phone 8
Add items to the listbox in Windows Phone application