Class TypeConverterHelper
- Namespace
- Ecng.ComponentModel
- Assembly
- Ecng.ComponentModel.dll
Auxilary class for accessing typed data from type converters.
public static class TypeConverterHelper
- Inheritance
-
TypeConverterHelper
- Inherited Members
Methods
FromString<T>(ITypeDescriptorContext, CultureInfo, string)
Converts the specified text to an object.
public static T FromString<T>(ITypeDescriptorContext context, CultureInfo culture, string value)
Parameters
context
ITypeDescriptorContextThe context.
culture
CultureInfoThe culture.
value
stringThe value.
Returns
- T
Type Parameters
T
FromString<T>(string)
Converts the specified text to an object.
public static T FromString<T>(string value)
Parameters
value
stringThe value.
Returns
- T
Type Parameters
T
GetConverter<T>()
Gets the converter.
public static TypeConverter GetConverter<T>()
Returns
Type Parameters
T
ToString<T>(ITypeDescriptorContext, CultureInfo, T)
Converts the specified value to a string representation.
public static string ToString<T>(ITypeDescriptorContext context, CultureInfo culture, T value)
Parameters
context
ITypeDescriptorContextThe context.
culture
CultureInfoThe culture.
value
TThe value.
Returns
Type Parameters
T
ToString<T>(T)
Converts the specified value to a string representation.
public static string ToString<T>(T value)
Parameters
value
TThe value.
Returns
Type Parameters
T