Click or drag to resize

CommonTypeConvertToString(Object, CultureInfo) Method

Converts value to a String using an appropriate TypeConverter.

Namespace: GSF
Assembly: GSF.Core (in GSF.Core.dll) Version: 2.4.191-beta+925724bd48239ba1d4417fe63f8c4977892ab734
Syntax
public static string TypeConvertToString(
	Object value,
	CultureInfo culture
)
View Source

Parameters

value  Object
Value to convert to a String.
culture  CultureInfo
CultureInfo to use for the conversion.

Return Value

String
value converted to a String.
Remarks

If TypeConverter fails, the value's ToString() value will be returned. Returned value will never be null, if no value exists an empty string ("") will be returned.

You can use the ConvertToTypeT(String, CultureInfo) string extension method or TypeConvertFromString(String, Type, CultureInfo) to convert the string back to its original Type.

See Also