Provides a set of backward compatible argument throw
helper methods added in the latest .NET versions.
Especially intended for projects with multiple TargetFrameworks
, for usage, standardization and maintainability.
The following methods are currently provided.
Compatibility method to ArgumentOutOfRangeException.ThrowIfGreaterThan<T>(T, T, String)
, which was introduced with .NET 8
Compatibility method to ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual<T>(T, T, String)
, which is part of the framework since .NET 8.
Compatibility method to ArgumentOutOfRangeException.ThrowIfLessThan<T>(T, T, String)
, which is part of the framework since .NET 8.
Compatibility method to ArgumentOutOfRangeException.ThrowIfLessThanOrEqual<T>(T, T, String)
, which is part of the framework since .NET 8.
Compatibility method to ArgumentNullException.ThrowIfNull(Object, String)
, which is part of the framework since .NET 8.
Compatibility method to ArgumentException.ThrowIfNullOrEmpty(String, String)
, which is part of the framework since .NET 8.
Compatibility method to ArgumentException.ThrowIfNullOrWhiteSpace(String, String)
, which is part of the framework since .NET 8.