Version

IsCompareValueValid Method

Indicates if the compare value is valid for the specified operator.
Syntax
'Declaration
 
Public Shared Function IsCompareValueValid( _
   ByVal comparisonOperator As ComparisonOperator, _
   ByVal compareValue As Object, _
   ByVal convertCulture As CultureInfo, _
   ByVal convertFormat As String, _
   ByRef error As Exception _
) As Boolean
public static bool IsCompareValueValid( 
   ComparisonOperator comparisonOperator,
   object compareValue,
   CultureInfo convertCulture,
   string convertFormat,
   out Exception error
)

Parameters

comparisonOperator
Comparison operator for which to check if the compare value is valid.
compareValue
Compare value.
convertCulture
Culture to use for converter purposes. If the compare value is not of the type suitable for the operator evaluation, it will be converted to appropriate type.
convertFormat
Format to use for converter purposes.
error
If the compar value is invalid, this parameter will be set to an error.

Return Value

True if the compare value is valid. False otherwise.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, 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