site image
Andrew Lock avatar

Andrew Lock

C#
  1. Loading...
  2. Sponsored by Dometrain Courses—Get 30% off Dometrain Pro with code ANDREW30 and access the best courses for .NET Developers

    30% off with code ANDREW30 on Dometrain Pro
  3. ASP.NET Core in Action, Third Edition

    My new book ASP.NET Core in Action, Third Edition is available now! It supports .NET 7.0, and is available as an eBook or paperback.

  4. Banner image for Benchmarking 4 reflection methods for calling a constructor in .NET

    Benchmarking 4 reflection methods for calling a constructor in .NET

    In this post I compare several different ways to call a constructor using reflection, and benchmark them to see which is fastest.…

  5. Banner image for Why is string.GetHashCode() different each time I run my program in .NET Core?

    Why is string.GetHashCode() different each time I run my program in .NET Core?

    In this post I discuss string.GetHashCode(), why it's randomised, and hash-attacks. I also provide a deterministic implementation you can use when it's safe.…

     in  ASP.NET Core.NET CoreC#
  6. Banner image for Creating an ASCII-art tree in C#

    Creating an ASCII-art tree in C#

    In this post I describe how to draw a tree-like directory structure using ASCII art in C#…

     in  C#Cake
  7. Banner image for Creating a .NET Standard Roslyn Analyzer in Visual Studio 2017

    Creating a .NET Standard Roslyn Analyzer in Visual Studio 2017

    In this post, I give a brief introduction to Roslyn analyzers, what they're for, and how to create a simple analyzer in Visual Studio 2017.…

  8. Banner image for Using anonymous types and tuples to attach correlation IDs to scope state with Serilog and Seq in ASP.NET Core

    Using anonymous types and tuples to attach correlation IDs to scope state with Serilog and Seq in ASP.NET Core

    In this post I describe two extension methods that make logging scopes as key-value pairs nicer in ASP.NET Core, by using anonymous types and tuples.…

     in  ASP.NET CoreASP.NET Core 2.0LoggingC#
  9. Banner image for Aligning strings within string.Format and interpolated strings

    Aligning strings within string.Format and interpolated strings

    In this post I describe a feature I only recently discovered: alignment in interpolated strings…

     in  C#
Andrew Lock | .Net Escapades
Want an email when
there's new posts?