-
IAsyncEnumerable: Think of It As an IAsyncIteratable
Starting in C# 8.0, C# shipped with new async enumerable features. The one we’re concerned with, for the intents/purposes/concerns of this blog post, is IAsyncEnumerable<T>. The first thing to understand the differentiation between a standard collection (e.g.: IList<T>, IEnumerable<T>, or ICollection<T>) and an async enumerable (e.g.: IAsyncEnumerable<T>) is that an async enumerable isn’t enumerated as…
-
Testing Private Methods in Static Classes: The Not-So-Easy Way
I had a problem with testing a method: The method is intentionally private, as exposing it public wouldn’t benefit anyone and it merely reduces code-overhead for repeated operations – given ‘x’ condition. In this case, it was if the product of two numbers was greater than nine, then take those numbers and add them together…