Cuemon .NET Framework
ThrowIfEqual<T>(T,T,String,String) Method

The type of objects to compare.
The first object to compare.
The second object to compare.
The name of the parameter that caused the exception.
A message that describes the error.
Validates and throws an System.ArgumentOutOfRangeException if the specified x object are equal to the y object.
Syntax
'Declaration
 
Public Overloads Shared Sub ThrowIfEqual(Of T)( _
   ByVal x As T, _
   ByVal y As T, _
   ByVal paramName As String, _
   ByVal message As String _
) 
public static void ThrowIfEqual<T>( 
   T x,
   T y,
   string paramName,
   string message
)

Parameters

x
The first object to compare.
y
The second object to compare.
paramName
The name of the parameter that caused the exception.
message
A message that describes the error.

Type Parameters

T
The type of objects to compare.
Exceptions
ExceptionDescription
System.ArgumentOutOfRangeExceptionx and y are equal to one another.
Requirements

Target Platforms: Windows 8, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Validator Class
Validator Members
Overload List

 

 


| Cuemon is licensed under a The MIT License (MIT)



© 2009-2015 Weubphoria. All Rights Reserved.

Documentation made easy with Document! X by Innovasys

Send Feedback