James Flower

C# .NET and Web Developer

Tag: c#

There are 2 posts with the "c#" tag.

Logging in .NET Core using ILogger

Posted on
4 min read

Logging is an important part of software development. It helps us know that tasks have been completed, monitor applications and provides a trail to follow when things don’t work. Microsoft has included a logging framework in .NET Core and ASP.NET Core to allow developers to easily implement logging and choose their own logging provider (this is the part which decides how to store your log messages). A good logging solution can be invaluable when an application stops working as expec

Read more...

Handling null values in C#

Posted on
4 min read

Handling null values in C# and .NET comes with the territory. Null values were introduced by Tony Hoare in mid-1960s to represent missing or unknown data. This is a useful capability but it has resulted in null reference exceptions becoming one of the most common causes of bugs which developers face. As a result, Tony Hoare now calls the null reference the ‘billion dollar mistake’. C# has always allowed reference types to be nullable, and as a result, the NullReferenceException is someth

Read more...