PackageUtilities.ConvertFromType<T> Method
Converts a string to an enumeration by using a converter.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Public Shared Function ConvertFromType(Of T As Structure) ( _
value As String, _
culture As CultureInfo _
) As Nullable(Of T)
public static Nullable<T> ConvertFromType<T>(
string value,
CultureInfo culture
)
where T : struct
public:
generic<typename T>
where T : value class
static Nullable<T> ConvertFromType(
String^ value,
CultureInfo^ culture
)
static member ConvertFromType :
value:string *
culture:CultureInfo -> Nullable<'T> when 'T : struct
JScript does not support generic types or methods.
Type Parameters
- T
The type of the Nullable.
Parameters
value
Type: StringThe string value.
culture
Type: CultureInfoThe CultureInfo of the string.
Return Value
Type: 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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.