TypeConverter

References
public class TypeConverter
Type converter implementation, for type converter compatibility in portable class libraries.
obsolete, Use System.ComponentModel.TypeConverter instead

Methods

CanConvertFrom

#
public virtual bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Determines whether this instance can convert from the specified context sourceType.
context (ITypeDescriptorContext)Context.
sourceType (Type)Source type.
true if this instance can convert from the specified context sourceType; otherwise, false.

CanConvertFrom

#
public bool CanConvertFrom(Type sourceType)
Determines whether this instance can convert from the specified sourceType.
sourceType (Type)Source type to convert from.
true if this instance can convert from the specified sourceType; otherwise, false.

CanConvertTo

#
public virtual bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Determines whether this instance can convert to the specified context destinationType.
context (ITypeDescriptorContext)Context.
destinationType (Type)Destination type.
true if this instance can convert to the specified context destinationType; otherwise, false.

CanConvertTo

#
public bool CanConvertTo(Type destinationType)
Determines whether this instance can convert to the specified destinationType.
destinationType (Type)Destination type.
true if this instance can convert to the specified destinationType; otherwise, false.

ConvertFrom

#
public virtual object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Converts the specified value.
context (ITypeDescriptorContext)Context.
culture (CultureInfo)Culture.
value (object)Value to convert.
The converted value.

ConvertFrom

#
public object ConvertFrom(object o)
Converts from the specified object.

ConvertFromInvariantString

#
public object ConvertFromInvariantString(ITypeDescriptorContext context, string text)
Converts from an invariant string.
context (ITypeDescriptorContext)Context.
text (string)Text to convert.
The from invariant string.

ConvertFromInvariantString

#
public object ConvertFromInvariantString(string text)
Converts from an invariant string.

ConvertFromString

#
public object ConvertFromString(ITypeDescriptorContext context, CultureInfo culture, string text)
Converts from string.
context (ITypeDescriptorContext)Context.
culture (CultureInfo)Culture.
text (string)Text to convert.
The converted object.

ConvertFromString

#
public object ConvertFromString(ITypeDescriptorContext context, string text)
Converts from string.

ConvertFromString

#
public object ConvertFromString(string text)
Converts from string.

ConvertTo

#
public virtual object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Converts to the specified type.
context (ITypeDescriptorContext)Context.
culture (CultureInfo)Culture.
value (object)Value to convert.
destinationType (Type)Destination type to convert to.
The converted object.

ConvertTo

#
public object ConvertTo(object value, Type destinationType)
Converts to the specified type.
value (object)Value to convert.
destinationType (Type)Destination type to convert to.
The converted object.

ConvertToInvariantString

#
public string ConvertToInvariantString(ITypeDescriptorContext context, object value)
Converts to invariant string.
context (ITypeDescriptorContext)Context.
value (object)Value to convert.
The converted string.

ConvertToInvariantString

#
public string ConvertToInvariantString(object value)
Converts to an invariant string.

ConvertToString

#
public string ConvertToString(ITypeDescriptorContext context, CultureInfo culture, object value)
Converts to a string.
context (ITypeDescriptorContext)Context.
culture (CultureInfo)Culture.
value (object)Value to convert.
The converted string.

ConvertToString

#
public string ConvertToString(ITypeDescriptorContext context, object value)
Converts to a string.
context (ITypeDescriptorContext)Context.
value (object)Value to convert.
The converted string.

ConvertToString

#
public string ConvertToString(object value)
Converts to a string.

GetConvertFromException

#
protected Exception GetConvertFromException(object value)
Gets the exception when converting from a value.
value (object)Value converted from.
The convert from exception.

GetConvertToException

#
protected Exception GetConvertToException(object value, Type destinationType)
Gets the exception when converting to a value.
value (object)Value converting to.
destinationType (Type)Destination type.
The convert to exception.

IsValid

#
public virtual bool IsValid(ITypeDescriptorContext context, object value)
Determines whether this instance is valid the specified context value.
context (ITypeDescriptorContext)Context.
value (object)Value.
true if this instance is valid the specified context value; otherwise, false.

IsValid

#
public bool IsValid(object value)
Determines whether this instance is valid the specified value.
value (object)Value.
true if this instance is valid the specified value; otherwise, false.