remove multiple items from list csharp

Code Example - remove multiple items from list csharp

                
                        MyList.RemoveAll(t => t.Name == "ABS" || t.Name == "XYZ" || t.Name == "APO");
                    
                
 

remove items from list csharp condition

                        
                                prods.RemoveAll(s => s.ID == 1)
                            
                        
 

remove from list based on condition csharp

                        
                                List<Int32> prods = GetListFromSever();
prods.RemoveAll(s => s.ID == 1)