TypeConverter.ConvertFromInvariantString Méthode
Définition
Convertit la valeur en valeur du type de ce convertisseur, à l'aide de la culture dite indifférente.Converts the value to a type of this converter, using the invariant culture.
Surcharges
ConvertFromInvariantString(String) |
Convertit la chaîne donnée en représentation sous forme de chaîne du type de ce convertisseur, à l'aide de la culture dite indifférente.Converts the given string to the type of this converter, using the invariant culture. |
ConvertFromInvariantString(ITypeDescriptorContext, String) |
Convertit la chaîne donnée au type de ce convertisseur, à l'aide des informations de culture indifférente et du contexte spécifiés.Converts the given string to the type of this converter, using the invariant culture and the specified context. |
ConvertFromInvariantString(String)
Convertit la chaîne donnée en représentation sous forme de chaîne du type de ce convertisseur, à l'aide de la culture dite indifférente.Converts the given string to the type of this converter, using the invariant culture.
public:
System::Object ^ ConvertFromInvariantString(System::String ^ text);
public object ConvertFromInvariantString (string text);
member this.ConvertFromInvariantString : string -> obj
Public Function ConvertFromInvariantString (text As String) As Object
Paramètres
Retours
Object représentant le texte converti.An Object that represents the converted text.
Exceptions
La conversion ne peut pas être effectuée.The conversion cannot be performed.
Remarques
L'implémentation par défaut retourne toujours null
.The default implementation always returns null
.
Voir aussi
S’applique à
ConvertFromInvariantString(ITypeDescriptorContext, String)
Convertit la chaîne donnée au type de ce convertisseur, à l'aide des informations de culture indifférente et du contexte spécifiés.Converts the given string to the type of this converter, using the invariant culture and the specified context.
public:
System::Object ^ ConvertFromInvariantString(System::ComponentModel::ITypeDescriptorContext ^ context, System::String ^ text);
public object ConvertFromInvariantString (System.ComponentModel.ITypeDescriptorContext context, string text);
member this.ConvertFromInvariantString : System.ComponentModel.ITypeDescriptorContext * string -> obj
Public Function ConvertFromInvariantString (context As ITypeDescriptorContext, text As String) As Object
Paramètres
- context
- ITypeDescriptorContext
ITypeDescriptorContext qui fournit un contexte de format.An ITypeDescriptorContext that provides a format context.
Retours
Object représentant le texte converti.An Object that represents the converted text.
Exceptions
La conversion ne peut pas être effectuée.The conversion cannot be performed.
Remarques
Une exception est levée si la chaîne ne peut pas être convertie en objet approprié.An exception is raised if the string cannot be converted into the appropriate object. L'implémentation par défaut retourne toujours null
.The default implementation always returns null
.
Utilisez le paramètre context
pour extraire des informations supplémentaires sur l'environnement à partir duquel ce convertisseur est appelé.Use the context
parameter to extract additional information about the environment from which this converter is invoked. Ce paramètre peut être null
, donc toujours le vérifier.This parameter can be null
, so always check it. En outre, les propriétés de l'objet de contexte peuvent retourner null
.Also, properties on the context object can return null
.