ArgumentOutOfRangeException.ThrowIfGreaterThan<T>(T, T, String) Méthode
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)
- T
Type des objets à valider.
- 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.
Produit | Versions |
---|---|
.NET | 8, 9, 10 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :