State pattern TCP example in C# This small C# code base translates the Design Patterns State example code to C#, to the best of my abilities. It then refactors the code to pure functions. The code is written as a technical appendix to a blog post.