PackageUtilities.ConvertFromType<T>(String, CultureInfo) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Convertit une chaîne en une énumération à l’aide d’un convertisseur.
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)
Paramètres de type
- T
Type de Nullable.
Paramètres
- value
- String
Valeur de chaîne.
- culture
- CultureInfo
Objet CultureInfo de la chaîne.
Retours
- Nullable<T>
La valeur de l'énumération.
Remarques
Le paramètre de type utilisé doit être une énumération pour laquelle il existe un sous-type de EnumConverter .