Mar 16 2018 — Have you ever wondered what is the correct way to determine either the local or public IP address of your PC? In this post, I explore various methods using built-in classes from the .NET Core framework. I attempt to determine my public/private IP address without the assistance of an external service, in order to eliminate any dependencies.
Feb 24 2018 — Parsing things from text is like death and taxes, it is an absolute certainty that there will be a requirement requiring you to accept a blob of text as an input, wave a magic wand, and voila! You produce a beautiful object as the output of your function. In this post, I demonstrate how to parse IPv4 addresses from text (single or all IPs in text), as well as additional helper methods that work with IP addresses.
Feb 04 2018 — The Task-based Asynchronous Pattern (TAP) is the recommended way to write asynchronous code for .NET applications. As I explained in my last post, TAP is intended to replace the Asynchronous Programming Model (APM) and the Event-based Asynchronous Pattern (EAP), however many classes in the .NET framework still use these older patterns. Fortunately, these can be turned into TAP-style “awaitable” methods with relative ease. By doing so, you reap the benefits that come from working with Task (and Task
Jan 29 2018 — Do the acronyms APM, EAP, and TAP mean anything to you? Have you ever wondered why there appears to be multiple redundant implementations of the same method in the .NET Framework? If so, you’ve come to the right place. I’ll try and explain why Microsoft felt the need to create three entirely distinct asynchronous programming patterns within the .NET framework and provide a few best practices to follow when writing asynchronous C# code.