| Clean Architecture Toolkit for .NET | |||||
|
Clean Architecture Toolkit is a clean, modular architecture foundation for .NET applications. It embraces SOLID principles and focuses on maintainability, testability, and scalability through clear boundaries and pluggable design. |
|
||||
|
| HOME | MODULE OVERVIEW | DEMO | CAT.EXTENSIONS | |
|||||
Code Reference
» Cat.Object.Extensions Assembly » Cat.Object.Extensions Namespace » ObjectExtensions Class
ObjectExtensions.ThrowIfNull<T>(this T, string) Method
Returns the argument once confirmed non-null, otherwise throws.
public static T ThrowIfNull<T>(this T? argument, string paramName);
Type parameters
T
The type of the argument.
Parameters
argument T
The argument to check.
paramName System.String
The name of the parameter to report in the exception.
Returns
T
argument, once confirmed non-null.
Exceptions
System.ArgumentNullException
Thrown when argument is null.