SelectionRangeConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)
Converts the specified value to the converter's native type by using the specified locale.
Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public override Object ConvertFrom( ITypeDescriptorContext context, CultureInfo culture, Object value )
Parameters
- context
- Type: System.ComponentModel.ITypeDescriptorContext
A ITypeDescriptorContext that provides a format context.
- culture
- Type: System.Globalization.CultureInfo
The locale information for the conversion.
- value
- Type: System.Object
The Object to convert.
| Exception | Condition |
|---|---|
| ArgumentException | value is of type String but could not be parsed into two strings representing dates. |
| InvalidCastException | value is of type String that was parsed into two strings, but the conversion of one or both into the DateTime type did not succeed. |
The ConvertFrom method is specialized to convert String values that represent a range of dates to their SelectionRange representations. Types other than String are passed to the base class implementation of this method.
Notes to InheritorsOverride this method to provide your own conversion requirements.
The context parameter can be used to extract additional information about the environment this converter is being invoked from. The parameter may be null, so you should always verify the information. Also, properties on the context object may also return null.
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.