PackageUtilities.ConvertToType<T>(T, Type, CultureInfo) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a string to an enumeration type.
public:
generic <typename T>
where T : value class static System::Object ^ ConvertToType(T value, Type ^ typeToConvert, System::Globalization::CultureInfo ^ culture);
public static object ConvertToType<T> (T value, Type typeToConvert, System.Globalization.CultureInfo culture) where T : struct;
static member ConvertToType : 'T * Type * System.Globalization.CultureInfo -> obj (requires 'T : struct)
Public Function ConvertToType(Of T As Structure) (value As T, typeToConvert As Type, culture As CultureInfo) As Object
Type Parameters
- T
The enum to convert to
Parameters
- value
- T
The enum value to be converted to
- typeToConvert
- Type
The type to convert
- culture
- CultureInfo
The culture to use to read the localized strings