Monthly Archives: September 2012

LINQ – the order of elements when using Where()

Last week I was asked if the order of elements found using a where clause was guaranteed to be the same as the order of the original collection. That question is hard to answer. In the normal case (where nobody has overwritten … Continue reading

Posted in C#, Linq | Tagged , , , , , , | Leave a comment

LINQ and iterating over null collections.

Ok, todays title is weird, but I have come up with a little hack, that will make the code easier to read (sometimes). At work we have some pretty clear specifications, that says how to fill out some properties in … Continue reading

Posted in C#, Linq | Tagged , , , , | Leave a comment

LINQ and counting

When we work with collections we often have to count the elements in some way. Sometimes we need to know how many elements there are or how many elements that  complies with some  condition. So let’s assume that I have … Continue reading

Posted in C#, Linq | Tagged , , , , , | 2 Comments

Do more, sleep more, feel better: Status after the three weeks.

Weeks two and three has been really good. I have run three times a week with one of my friends and my stamina has definitely gotten better. On the other hand, one of my goals was to go to bed … Continue reading

Posted in Health, Life Quality | Tagged , , | Leave a comment