Class Byte4TypeConverter
Provides a unified way of converting Byte4 value to other types, as well as for accessing standard values and subproperties.
public class Byte4TypeConverter : TypeConverter
- Inheritance
-
Byte4TypeConverter
- Inherited Members
Methods
CanConvertFrom(ITypeDescriptorContext, Type)
Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
context
ITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
sourceType
TypeA Type that represents the type you want to convert from.
Returns
CanConvertTo(ITypeDescriptorContext, Type)
Returns whether this converter can convert the object to the specified type, using the specified context.
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
context
ITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
destinationType
TypeA Type that represents the type you want to convert to.
Returns
ConvertFrom(ITypeDescriptorContext, CultureInfo, object)
Converts the given object to the type of this converter, using the specified context and culture information.
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
context
ITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
culture
CultureInfoThe CultureInfo to use as the current culture.
value
objectThe object to convert.
Returns
Exceptions
- NotSupportedException
The conversion cannot be performed.
ConvertTo(ITypeDescriptorContext, CultureInfo, object, Type)
Converts the given value object to the specified type, using the specified context and culture information.
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
context
ITypeDescriptorContextAn ITypeDescriptorContext that provides a format context.
culture
CultureInfoA CultureInfo. If null is passed, the current culture is assumed.
value
objectThe object to convert.
destinationType
TypeThe Type to convert the
value
parameter to.
Returns
Exceptions
- ArgumentNullException
The
destinationType
parameter is null.- NotSupportedException
The conversion cannot be performed.