PackageUtilities.ConvertFromType<T>(String, 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 by using a converter.
public:
generic <typename T>
where T : value class static Nullable<T> ConvertFromType(System::String ^ value, System::Globalization::CultureInfo ^ culture);
public static T? ConvertFromType<T> (string value, System.Globalization.CultureInfo culture) where T : struct;
static member ConvertFromType : string * System.Globalization.CultureInfo -> Nullable<'T (requires 'T : struct)> (requires 'T : struct)
Public Function ConvertFromType(Of T As Structure) (value As String, culture As CultureInfo) As Nullable(Of T)
Type Parameters
- T
Parameters
- value
- String
- culture
- CultureInfo
The culture to use to read the localized strings
Returns
Nullable<T>
Remarks
The type parameter used should be an enumeration for which there is a subtype of EnumConverter.