c# - How does the Search Predicate of Findall work in a generic List -


I am able to work with findAll and this means ... but I am thinking of that device Which does this work.

list & lt; BradCollection & gt; B = myList.FindAll (SearchForMe); & Lt; BradCollection & gt; SearchForm (string str) {if (str.Contains ("brad")) comes true; Second false return; }

Where is the "str" ​​argument found in the search form?

I'm not sure what you are asking; Perhaps a look at the simplified implementation of FindAll will help to see if FindAll is actually implemented, but it is enough to understand what is happening:

  public representative bool Predicate & lt; A & gt; (A RGR); ... public list & lt; T & gt; FindAll (Predicate & lt; T & gt; Forecast) {var results = new list & lt; T & gt; (); If the object (object) results in foreach (t item in this). Add (item); Return result; }  

What is the answer to your question?


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -