Base class of custom System.ComponentModel.TypeConverter
for string
and target type.
More...
Inherits TypeConverter.
Inherited by NumericStringConverter< T >.
|
override bool | CanConvertFrom (ITypeDescriptorContext context, Type sourceType) |
| Returns whether this converter can convert an object of one type to the type of this converter. More...
|
|
override bool | CanConvertTo (ITypeDescriptorContext context, Type destinationType) |
| Returns whether this converter can convert the object to the specified type. More...
|
|
override object | ConvertFrom (ITypeDescriptorContext context, CultureInfo culture, object value) |
| Converts the given value to the type of this converter. More...
|
|
override object | ConvertTo (ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) |
| Converts the given value object to the specified type. More...
|
|
|
virtual string | ToString (T value) |
| Convert the value of target type to string . More...
|
|
abstract T | FromString (string value) |
| Convert the value of string to target type. More...
|
|
Base class of custom System.ComponentModel.TypeConverter
for string
and target type.
- Template Parameters
-
override bool CanConvertFrom |
( |
ITypeDescriptorContext |
context, |
|
|
Type |
sourceType |
|
) |
| |
Returns whether this converter can convert an object of one type to the type of this converter.
- Parameters
-
context | An ITypeDescriptorContext that provides a format context. |
sourceType | A Type that represents the type you want to convert from. |
- Returns
true
if this converter can perform the conversion; otherwise, false
.
override bool CanConvertTo |
( |
ITypeDescriptorContext |
context, |
|
|
Type |
destinationType |
|
) |
| |
Returns whether this converter can convert the object to the specified type.
- Parameters
-
context | An ITypeDescriptorContext that provides a format context. |
destinationType | A Type that represents the type you want to convert to. |
- Returns
true
if this converter can perform the conversion; otherwise, false
.
override object ConvertFrom |
( |
ITypeDescriptorContext |
context, |
|
|
CultureInfo |
culture, |
|
|
object |
value |
|
) |
| |
Converts the given value to the type of this converter.
- Parameters
-
context | An ITypeDescriptorContext that provides a format context. |
culture | The CultureInfo to use as the current culture. |
value | The object to convert. |
- Returns
- An
object
that represents the converted value.
override object ConvertTo |
( |
ITypeDescriptorContext |
context, |
|
|
CultureInfo |
culture, |
|
|
object |
value, |
|
|
Type |
destinationType |
|
) |
| |
Converts the given value object to the specified type.
- Parameters
-
context | An ITypeDescriptorContext that provides a format context. |
culture | The CultureInfo to use as the current culture. |
value | The object to convert. |
destinationType | The Type to convert the value parameter to. |
- Returns
- An
object
that represents the converted value.
virtual string ToString |
( |
T |
value | ) |
|
|
protectedvirtual |
Convert the value of target type to string
.
- Parameters
-
value | The target type value. |
- Returns
- The
string
.
abstract T FromString |
( |
string |
value | ) |
|
|
protectedpure virtual |