c# - How to Get List of Classes where string Property is null or Empty string value? -


i have class called, header, , within class, called home, create list<header>, called headerlist, works fine , gathers list of headers needed. header class has property called, mobileimage within list mobileimage property isnullorempty, returning empty list of time code below:

list<header> nonmobileheaderlist = home.headerlist.findall(u => string.isnullorempty(u.mobileimage)).tolist();  if (nonmobileheaderlist.count > 0) {     response.write("there images non-mobile browsers."); } else {    response.write("there no images non-mobile browsers.") } 

my understanding findall should return of elements in list based on predicate. why not working? if do:

list<header> allheaders = home.headerlist;

all headers contain list of headers correctly. have loop through headers in order ones need based on property value? seriously? thought findall supposed this?

seems more page lifecycle issue findall. statement correct, besides won't need .tolist() findall should return new list<t> instance.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -