DataSourceCacheDurationConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

 

Converts the specified object to an Int32 object.

Namespace:   System.Web.UI
Assembly:  System.Web (in System.Web.dll)

public override object ConvertFrom(
	ITypeDescriptorContext context,
	CultureInfo culture,
	object value
)

Parameters

context
Type: System.ComponentModel.ITypeDescriptorContext

An ITypeDescriptorContext that provides a format context.

culture
Type: System.Globalization.CultureInfo

A CultureInfo that specifies the culture in which to represent the number.

value
Type: System.Object

The object to convert.

Return Value

Type: System.Object

An object that represents the converted value. If null is passed in the value parameter, null is returned.

The DataSourceCacheDurationConverter.ConvertFrom method converts an String.Empty string or the string "Infinite" to the value 0. Other values are handled by the base class, Int32Converter.

.NET Framework
Available since 2.0
Return to top
Show: