C # list <T> get return sorted list
I have basically:
public class Object{
public bool IsObjectValid { set; get; }
}
public class MyThing{
public List<Object> Objects { set; get; }
}
What I want to do:
public class ObjectsFiltered{
public List<Object> ValidObjects{
get{
var list = LFs.Sort<_LF> where (IsObjectValid == true);
return list;
}
}
}
I know there should be a way to sort the list by filtering out bool true / false. I just can't completely wrap my head around Link. I just can't find a tutorial that screams "AH HA!". About Linq Lambda for me: /
I would rather just return a subset, only save only one “object” ... instead of the current setting of multiple sets of lists. KISS.
Ultimately, I will use bool-toggles to combine TreeViews in my WPF form.
: , , ( ) , . , ObjecstValid, ObjectsInvalid, ObjectsSomeOtherRuleSet... ...
, ... , , .
+3
4