DocSpace-buildtools/common/ASC.Common/ArgumentNullExceptionExtension.cs

13 lines
343 B
C#
Raw Normal View History

2022-03-09 17:15:51 +00:00
namespace System;
public static class ArgumentNullOrEmptyException
{
public static void ThrowIfNullOrEmpty(string argument, [CallerArgumentExpression("argument")] string? paramName = null)
{
if (string.IsNullOrEmpty(argument))
{
throw new ArgumentNullException(paramName);
}
}
}