Partager via


ModelingEnumerationConverter.ConvertFrom Method (ITypeDescriptorContext, CultureInfo, Object)

Converts the specified value object to a domain enumeration object by using the specified context.

Namespace:  Microsoft.VisualStudio.Modeling.Design
Assembly:  Microsoft.VisualStudio.Modeling.Sdk.10.0 (in Microsoft.VisualStudio.Modeling.Sdk.10.0.dll)

Syntax

'Déclaration
Public Overrides Function ConvertFrom ( _
    context As ITypeDescriptorContext, _
    culture As CultureInfo, _
    value As Object _
) As Object
public override Object ConvertFrom(
    ITypeDescriptorContext context,
    CultureInfo culture,
    Object value
)
public:
virtual Object^ ConvertFrom(
    ITypeDescriptorContext^ context, 
    CultureInfo^ culture, 
    Object^ value
) override
abstract ConvertFrom : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object -> Object 
override ConvertFrom : 
        context:ITypeDescriptorContext * 
        culture:CultureInfo * 
        value:Object -> Object 
public override function ConvertFrom(
    context : ITypeDescriptorContext, 
    culture : CultureInfo, 
    value : Object
) : Object

Parameters

Return Value

Type: System.Object
The converted value.

Exceptions

Exception Condition
FormatException

value is not a valid value for the target type.

Remarks

This converter can only convert an enumeration object to and from a string.

By default, the culture parameter is ignored.

Notes to Inheritors

Override this method to provide your own conversion.

.NET Framework Security

See Also

Reference

ModelingEnumerationConverter Class

ConvertFrom Overload

Microsoft.VisualStudio.Modeling.Design Namespace