C# Class System.ComponentModel.DateTimeOffsetConverter

Inheritance: TypeConverter
显示文件 Open project: dotnet/corefx Class Usage Examples

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Gets a value indicating whether this converter can convert an object in the given source type to a object using the specified context.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Gets a value indicating whether this converter can convert an object to the given destination type using the context.

ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object

Converts the given value object to a object.

ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object

Converts the given value object to a object using the arguments.

Method Details

CanConvertFrom() public method

Gets a value indicating whether this converter can convert an object in the given source type to a object using the specified context.

public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool

CanConvertTo() public method

Gets a value indicating whether this converter can convert an object to the given destination type using the context.

public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType System.Type
return bool

ConvertFrom() public method

Converts the given value object to a object.

public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext
culture CultureInfo
value object
return object

ConvertTo() public method

Converts the given value object to a object using the arguments.

public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext
culture CultureInfo
value object
destinationType System.Type
return object