Process.ReadAllText(Nullable<TimeSpan>) 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.
Lit toutes les sorties standard et toutes les erreurs standard du processus en tant que texte.
public(string StandardOutput, string StandardError) ReadAllText(TimeSpan? timeout = default);
member this.ReadAllText : Nullable<TimeSpan> -> ValueTuple<string, string>
Public Function ReadAllText (Optional timeout As Nullable(Of TimeSpan) = Nothing) As ValueTuple(Of String, String)
Paramètres
Durée maximale pendant laquelle attendre que les flux soient entièrement lus. Quand null, attend indéfiniment.
Retours
Tuple contenant la sortie standard et le texte d’erreur standard.
Exceptions
timeout, tronqué en un nombre entier de millisecondes, est inférieur à -1 ou supérieur à MaxValue.
La sortie standard ou l’erreur standard n’a pas été redirigée.
- ou -
Un flux redirigé a déjà été utilisé pour la lecture synchrone ou asynchrone.
L’opération n’a pas terminé dans le fichier spécifié timeout.
Le processus a été supprimé.