Edit

DurationConverter Class

Definition

Converts instances of Duration to and from other type representations.

public ref class DurationConverter : System::ComponentModel::TypeConverter
public class DurationConverter : System.ComponentModel.TypeConverter
type DurationConverter = class
    inherit TypeConverter
Public Class DurationConverter
Inherits TypeConverter
Inheritance
DurationConverter

Remarks

This converter converts either from a string representation of a TimeSpan or from named constants of Duration.

Constructors

Name Description
DurationConverter()

Initializes a new instance of the DurationConverter class.

Methods

Name Description
CanConvertFrom(ITypeDescriptorContext, Type)

Determines if conversion from a given type to an instance of Duration is possible.

CanConvertTo(ITypeDescriptorContext, Type)

Determines if conversion to a specified type is possible.

ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)

Converts a given string value to an instance of Duration.

ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)

Converts an instance of Duration to another type.

Applies to

See also