ArgumentOutOfRangeException.ThrowIfNegative<T>(T, String) Método
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Lança um ArgumentOutOfRangeException se value é negativo.
public static void ThrowIfNegative<T>(T value, string? paramName = default) where T : System.Numerics.INumberBase<T>;
static member ThrowIfNegative : 'T * string -> unit (requires 'T :> System.Numerics.INumberBase<'T>)
Public Shared Sub ThrowIfNegative(Of T As INumberBase(Of T)) (value As T, Optional paramName As String = Nothing)
Parâmetros de Tipo Genérico
- T
O tipo de objeto a validar.
Parâmetros
- value
- T
O argumento para validar como não negativo.
- paramName
- String
O nome do parâmetro com o qual value corresponde.