-
Notifications
You must be signed in to change notification settings - Fork 5k
Closed
Description
public class List : ICollection, IEnumerable, IEnumerable, IList, IReadOnlyCollection, IReadOnlyList, ICollection, IList
public interface IList : ICollection, IEnumerable, IEnumerable
IList only have Remove() and RemoveAt()... Wouldn't be more interesting put the RemoveAll() method signature in IList for access it?? Neither ICollection or IEnumerable has these methods signatures. Because if I want to remove all items under a specific condition through IList interface I have to transform to a List first
// Enderecos is IList type
var listEnderecos = clienteModel.Enderecos.ToList();
listEnderecos.RemoveAll(p => p == null);
clienteModel.Enderecos = listEnderecos;
With RemoveAll() method in IList
// Enderecos is IList type
clienteModel.Enderecos.RemoveAll(p => p == null);
Metadata
Metadata
Assignees
Labels
No labels