ArgumentOutOfRangeException.ThrowIfEqual<T>(T, T, String) 메서드

정의

if가 같으면 throw합니다 ArgumentOutOfRangeExceptionvalueother.

public static void ThrowIfEqual<T>(T value, T other, string? paramName = default);
public static void ThrowIfEqual<T>(T value, T other, string? paramName = default) where T : IEquatable<T>;
static member ThrowIfEqual : 'T * 'T * string -> unit
static member ThrowIfEqual : 'T * 'T * string -> unit (requires 'T :> IEquatable<'T>)
Public Shared Sub ThrowIfEqual(Of T) (value As T, other As T, Optional paramName As String = Nothing)
Public Shared Sub ThrowIfEqual(Of T As IEquatable(Of T)) (value As T, other As T, Optional paramName As String = Nothing)

형식 매개 변수

T

유효성을 검사할 개체의 형식입니다.

매개 변수

value
T

유효성을 검사할 인수가 .와 other같지 않음

other
T

비교할 값입니다 value.

paramName
String

해당하는 매개 변수 value 의 이름입니다.

적용 대상