ComValue.SetValueFromSystemConvert

Allows you to call a method on the System.Convert (as a string method name) and pass a single value that is then converted and stored on the Value member.

This function is more agressive in its type conversion as it works with many different input types and can do unconventional conversions like convert a string to a number for example.

loValue.SetValueFromSystemConvert("ToUInt64",20)
? loValue.ToString()  && 20  - loValue.Value is UInt64

loValue.SetValueFromSystemConvert("ToUInt64","20"
? loValue.ToString()  && 20  - loValue.Value is UInt64

Please check the System.Convert class reference for conversions available.

o.ComValue.SetValueFromSystemConvert(string method, object value)

Parameters

method
Name of the method on System.Convert to invoke as a string.

object value
The value to convert. Note that not all values can be converted.


See also:

Class ComValue | System.Convert

© West Wind Technologies, 1996-2022 • Updated: 06/05/16
Comment or report problem with topic