PackageUtilities.ConvertFromType<T>(String, CultureInfo) Method

Definition

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

Remarks

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

Applies to