Converts a string to a numeric value.
Namespace: Simol.FormattersAssembly: Simol (in Simol.dll) Version: 1.0.0.0
Syntax
C# |
---|
public virtual Object ToType( string valueString, Type expected ) |
Visual Basic |
---|
Public Overridable Function ToType ( _ valueString As String, _ expected As Type _ ) As Object |
Visual C++ |
---|
public: virtual Object^ ToType( String^ valueString, Type^ expected ) |
Parameters
- valueString
- Type: System..::..String
The string value to convert.
- expected
- Type: System..::..Type
The expected type of the returned object.
Return Value
The converted object or nullImplements
ITypeFormatter..::..ToType(String, Type)Exceptions
Exception | Condition |
---|---|
System..::..ArgumentNullException | If the valueString parameter is null |
System..::..ArgumentException | If the expected parameter is an unsupported type |