TimeSpanMinutesOrInfiniteConverter.ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type) Método
Definição
public:
override System::Object ^ ConvertTo(System::ComponentModel::ITypeDescriptorContext ^ ctx, System::Globalization::CultureInfo ^ ci, System::Object ^ value, Type ^ type);
public override object ConvertTo (System.ComponentModel.ITypeDescriptorContext ctx, System.Globalization.CultureInfo ci, object value, Type type);
override this.ConvertTo : System.ComponentModel.ITypeDescriptorContext * System.Globalization.CultureInfo * obj * Type -> obj
Public Overrides Function ConvertTo (ctx As ITypeDescriptorContext, ci As CultureInfo, value As Object, type As Type) As Object
Parâmetros
O objeto ITypeDescriptorContext usado para conversões de tipo.The ITypeDescriptorContext object used for type conversions.
- ci
- CultureInfo
O objeto CultureInfo usado durante a conversão.The CultureInfo object used during conversion.
- value
- Object
O valor a ser convertido.The value to convert.
- type
- Type
O tipo da conversão.The conversion type.
Retornos
A String "infinite", se o parâmetro value é MaxValue; caso contrário, o String que representa o parâmetro value em minutos.The String "infinite", if the value parameter is MaxValue; otherwise, the String representing the value parameter in minutes.
Exemplos
Consulte os exemplos de código nas InfiniteTimeSpanConverter classes e TimeSpanMinutesConverter .Refer to the code examples in the InfiniteTimeSpanConverter and TimeSpanMinutesConverter classes.
Comentários
O sistema usa o ConvertTo método ao gravar em um arquivo de configuração para converter um TimeSpan valor ou MaxValue em um String .The system uses the ConvertTo method when writing to a configuration file to convert a TimeSpan value or MaxValue to a String.