-1

I am using foreach loop to get generic list items which iterates all items, but I want to get certain items, with a condition. I am doing it like following:

 foreach (FilesToProcessDataModels item in ListfilesToProcess)
            {
                if (item.IsChecked)
                {
                    //file operations
                }
            }

Is there any way that i can do it without if statement, to iterate the data where item.IsChecked==true in foreach loop.

4

2 に答える 2