ArgumentOutOfRangeException.ThrowIfGreaterThan<T>(T, T, String) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Lève un ArgumentOutOfRangeException si value supérieur à other.
public static void ThrowIfGreaterThan<T>(T value, T other, string? paramName = default) where T : IComparable<T>;
static member ThrowIfGreaterThan : 'T * 'T * string -> unit (requires 'T :> IComparable<'T>)
Public Shared Sub ThrowIfGreaterThan(Of T As IComparable(Of T)) (value As T, other As T, Optional paramName As String = Nothing)
Paramètres de type
- T
Type des objets à valider.
Paramètres
- value
- T
Argument à valider comme inférieur ou égal à other.
- other
- T
Valeur à comparer avec value.
- paramName
- String
Nom du paramètre avec lequel value correspond.