public static Object? TypeConvertFromString(
string value,
Type type,
CultureInfo? culture,
bool suppressException = true
)
Public Shared Function TypeConvertFromString (
value As String,
type As Type,
culture As CultureInfo,
Optional suppressException As Boolean = true
) As Object
public:
static Object^ TypeConvertFromString(
String^ value,
Type^ type,
CultureInfo^ culture,
bool suppressException = true
)
Gemstone.Common.TypeConvertFromString = function(value, type, culture, suppressException);
This function makes use of a TypeConverter to convert value to the specified type, the best way to make sure value can be converted back to its original type is to use the same TypeConverter to convert the original object to a String; see the TypeConvertToString(Object) method for an easy way to do this.
This function varies from ConvertToTypeT(String, CultureInfo) in that it will use the default value for the type parameter if value is empty or null.