The last part of the series was all about increasing underlying array size. This time, I’ll try to investigate something slightly different. Question is simple: Is the underlying array shrunk when you remove elements from the list? Let’s find that out! To do that, we have to look for all possible ways you can remove […]
This time I’ll try to examine how are all search-related methods in List<T> implemented. Here is quite long list of all these methods: public bool Exists(Predicate<T> match) public T Find(Predicate<T> match) public List<T> FindAll(Predicate<T> match) public int FindIndex(Predicate<T> match) public int FindIndex(int startIndex, Predicate<…
Another blog post inspired by StackOverflow question. This time it’s all about LINQ, performance and a tiny little detail, that really matters. The question itself is about yield keyword in VB.NET, but there is another, much more interesting part I’d like to examine. The algorithm quoted in the question is the key. The idea is […]
I’ve spent last two days working on my first open source .NET library named CloneExtensions. It gives you a smart way to clone your object instances without implementing any interface writing any additional Clone method at all. It uses Expression Tree to compile that Clone method for you right before you’re trying to use GetClone […]
I just watched The Future of C# talk by Mads Torgersen recorded at NDC London conference over a month ago. Among all the stuff Mads talked about one really drawn my attention: methods/properties with multiple results. Unfortunately, instead of providing some new, crazy idea how to make it possible in C# he focused on making current usage easier. […]
« first day (380 days earlier) ← previous day next day → last day (3737 days later) »