Version

DataType Property (RangeCondition)

Gets/sets the Type to which values are to be converted before determining whether the comparison value lies within range.
Syntax
'Declaration
 
Public Property DataType As Type
public Type DataType {get; set;}
Remarks

The DataType property can be left at its default value, null (Nothing in VB), when the MinimumValue, MaximumValue, and the value to be tested are all known to be of the same data type.

Note: Specifying a type which differs from the actual type of one or more of the values being compared can result in unexpected behavior. For example, consider the case where the MaximumValue property is set to the integer value 1, the MaximumValue property is set to the integer value 5, and the value to be tested is the integer value 10. If the DataValue property is left at null, the comparison will be made with the assumption that all values are of the same type, and the value 10 will be correctly found to lie outside the range of 1 to 5. If in the same scenario the DataType property is set to string, the values will first be converted to their respective string representations, and the value "10" will then be considered to be within the range of "1" to "5", since a string comparison works differently than a numeric comparison.

Requirements

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