Tag Archives: unit test

IEnumerable Guard Clause Best Practice

IEnumerable is C#’s built-in implementation of the iterator design pattern. It’s very powerful. Below is how to iterate through IEnumerable in C#: The Gotcha. IEnumerable defers execution until code actually acts on the elements returned from IEnumerable. This also defers … Continue reading

Posted in C#, Unit Testing | Tagged , , , , | Leave a comment