Good day !
There is an array in which the CheckBox written. Some of them isChecked , some !isChecked .
I need to select all checkbox that isChecked and remove from this array all checkBox which have .Tag == "равен чему либо".
I tried this:
var myTestArray = _statusCheckBoxes.Where(x => !x.Tag.Equals("New") && !x.Tag.Equals("Active") && !x.Tag.Equals("Activating")); // тут я хотел выбрать все чексбоксы кроме тех, у которых .Tag равен (New, Active, Activating) var xxx = myTestArray.Where(x => x.IsChecked); // тут я выбрал из тех, которые мне нужны isSelected But my request to select the necessary elements does not work. Tell me how this can be done or what do I need to change in this code?
Thank !
UPD.
private void checkTestMethod() { var myxxx = _statusCheckBoxes.Where( x => (x.Tag as string) != "New" && (x.Tag as string) != "Active" && (x.Tag as string) != "Activating"); var xxx = myxxx.Where(x => x.IsChecked); foreach (var item in xxx) { if (item.IsChecked) MessageBox.Show("Bla bla bla"); } }