Tag Archives: collection

Indexing for IndexOf

Today, a short one. But it gave me some not-so-short trouble recently. Do you happen to use or inherit Collection or any of its subclasses (e.g. ObservableCollection)? Make sure you don’t call its IndexOf method too much. As indicated on … Continue reading

Posted in .NET | Tagged , , , | Leave a comment

IReadOnlyCollection instead of IEnumerable

Whenever you expose a service API, either internally to your team, or publicly in a framework, such as with an interface or simply in a method signature and you want the client to pass or receive a collection of objects you have … Continue reading

Posted in .NET, C# | Tagged , , , , , , , | 1 Comment