PackageUtilities.ConvertToType<T> Method
Converts a string to an enumeration type.
Namespace: Microsoft.VisualStudio.Shell
Assembly: Microsoft.VisualStudio.Shell.11.0 (in Microsoft.VisualStudio.Shell.11.0.dll)
Syntax
'宣告
Public Shared Function ConvertToType(Of T As {Structure, New}) ( _
value As T, _
typeToConvert As Type, _
culture As CultureInfo _
) As Object
public static Object ConvertToType<T>(
T value,
Type typeToConvert,
CultureInfo culture
)
where T : struct, new()
Type Parameters
- T
The enum to which to convert.
Parameters
- value
Type: T
The enumeration to which the string is to be converted.
- typeToConvert
Type: System.Type
The value to convert.
- culture
Type: System.Globalization.CultureInfo
A CultureInfo object describing the culture to use to read localized strings.
Return Value
Type: System.Object
The enumeration type.
.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.