Nullable

There is a parameter/value type that allows you to set a field to null. It's appropriately called "Nullable<T>".

This comes in handy when designing a method to handle an incoming parameter as null. With some added logic, this could another way of effectively overloading a method or simply handling a null input parameter. This technique was especially useful when writing endpoints to an API controller.

Comments

Popular posts from this blog

APIs