DurationConverter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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. |