Export (0) Print
Expand All

InfiniteTimeSpanConverter.ConvertTo Method (ITypeDescriptorContext, CultureInfo, Object, Type)

Converts a TimeSpan to a String.

Namespace:  System.Configuration
Assembly:  System.Configuration (in System.Configuration.dll)

public override Object ConvertTo(
	ITypeDescriptorContext ctx,
	CultureInfo ci,
	Object value,
	Type type
)

Parameters

ctx
Type: System.ComponentModel.ITypeDescriptorContext

The ITypeDescriptorContext object used for type conversions.

ci
Type: System.Globalization.CultureInfo

The CultureInfo used during object conversion.

value
Type: System.Object

The value to convert.

type
Type: System.Type

The conversion type.

Return Value

Type: System.Object
The String "infinite", if the value parameter is MaxValue; otherwise, the String representing the value parameter in minutes.

The system uses the ConvertTo method when writing an attribute to a configuration file to convert a TimeSpan object to a String object.

The system uses the ConvertTo method when writing to a configuration file to convert a TimeSpan value or MaxValue to a String.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft