BaseCompareValidator::Convert Method (String, ValidationDataType, Boolean, Object%)
Converts the specified text into an object of the specified data type. This version of the overloaded method allows you to specify whether values are converted using a culture-neutral format.
Assembly: System.Web (in System.Web.dll)
protected: static bool Convert( String^ text, ValidationDataType type, bool cultureInvariant, [OutAttribute] Object^% value )
Parameters
- text
- Type: System::String
The text to convert.
- type
- Type: System.Web.UI.WebControls::ValidationDataType
One of the ValidationDataType values.
- cultureInvariant
- Type: System::Boolean
true to convert values to a culture-neutral format; otherwise, false.
- value
- Type: System::Object%
When this method returns, contains an object with the conversion result. This parameter is passed uninitialized.
The Convert(String, ValidationDataType, Boolean, Object%) method is used to convert text into an object of the specified data type. Although the method returns true or false to indicate whether the conversion was successful, the converted value is stored in the value out parameter.
Note: |
|---|
If the conversion is unsuccessful, the value parameter is set to nullptr. |
To indicate that values should be converted using a culture-neutral format, pass in true for the cultureInvariant parameter; otherwise, values are converted using the format used by the current culture. When converting a value using the format used by the current culture, consider using the BaseCompareValidator::Convert(String, ValidationDataType, Object%) overloaded version of this method.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Note: