XmlConvert.ToTimeSpan(String) Méthode

Définition

Convertit le String en équivalent TimeSpan .

public:
 static TimeSpan ToTimeSpan(System::String ^ s);
public static TimeSpan ToTimeSpan(string s);
static member ToTimeSpan : string -> TimeSpan
Public Shared Function ToTimeSpan (s As String) As TimeSpan

Paramètres

s
String

La chaîne à convertir. Le format de chaîne doit être conforme à la partie 2 du schéma XML W3C : recommandation des types de données pour la durée.

Retours

Équivalent TimeSpan de la chaîne.

Exceptions

s n’est pas au format correct pour représenter une TimeSpan valeur.

S’applique à