PackageUtilities.ConvertFromType<T> Method

Converts a string to an enumeration using a converter.

This API is not CLS-compliant. The CLS-compliant alternative is [None].

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Declaration
<CLSCompliantAttribute(False)> _
Public Shared Function ConvertFromType(Of T As Structure) ( _
    value As String, _
    culture As CultureInfo _
) As Nullable(Of T)
[CLSCompliantAttribute(false)]
public static Nullable<T> ConvertFromType<T>(
    string value,
    CultureInfo culture
)
where T : struct
[CLSCompliantAttribute(false)]
public:
generic<typename T>
where T : value class
static Nullable<T> ConvertFromType(
    String^ value, 
    CultureInfo^ culture
)
[<CLSCompliantAttribute(false)>]
static member ConvertFromType : 
        value:string * 
        culture:CultureInfo -> Nullable<'T>  when 'T : struct
JScript does not support generic types or methods.

Type Parameters

Parameters

Return Value

Type: System.Nullable<T>
The enumeration value.

Remarks

The type parameter used should be an enumeration for which there is a subtype of EnumConverter.

.NET Framework Security

See Also

Reference

PackageUtilities Class

Microsoft.VisualStudio.Shell Namespace