Tag «ReSharper»

The problem with null checking

The .NET framework is littered with the following code (e.g. from the System.Guid class):

A common scenario when creating a publicly accessible method is to validate the parameters being passed into the method and throw an exception when something is amiss.  I used this example as Guid.ParseExact was only added in .NET 4, showing …