how to pass a input parameter _HeaderToSearch in Predicate
2008-07-13 23:10
627 查看
Then, how to pass a input parameter _HeaderToSearch in Predicate?
1. To do that, we need to a new object called ListMatcher -
2. Next , I initialized the ListMatcher object and use the HeaderToSearch to filter the items-
Done.
1. To do that, we need to a new object called ListMatcher -
public class ListMatcher { private string _HeaderToSearch; public ListMatcher(string headerToSearch) { _HeaderToSearch = headerToSearch; } public bool Predicate(SprintBacklogItem item) { return item.Title.StartsWith(_HeaderToSearch, StringComparison.InvariantCultureIgnoreCase); } }
2. Next , I initialized the ListMatcher object and use the HeaderToSearch to filter the items-
ListMatcher matcher = new ListMatcher("QA"); this.FindAll(matcher.Predicate);
Done.
相关文章推荐
- How to pass a input parameter in Script task of SSIS
- How to use Metadata as search parameter in Advance Search Web Part
- Fiori2.0-How to pass the Parameterin in the different views?
- How to pass a parameter to HyperLink in GridView/DataList
- How to set user-defined-type as Oracle SP input parameter in .NET
- How to set user-defined-type as Oracle SP input parameter in .NET
- How to modify the Header Search Paths In XCode 4
- How to pass NULL value to a Multi value parameter in SSRS?
- How to Capture the Row Selected on Search Page In a Variable?
- JS:Trim() in javascript, how to define a function of checkinput for a WebControl(ascx)
- how to search new file in linux
- How-to: resolve spark streaming "Not enough space to cache input-0-* in memory! "
- How to pass in/out return VB Byte array from a COM Component written in C#
- TypeError: Value passed to parameter 'input' has DataType float64 not in list of allowed values: fl
- How to search a table in a store proc and open the store proc
- How to set the default input focus on a field in an HTML web form
- How To Implement Search Bar in iOS 7 Using Storyboard
- How to pass arguments in exchange
- How to run Java main class and pass application arguments in Maven?
- How to embed Google Custom Search Engine in Magento