La méthode Flush de System.IO.StreamWriter en C# est utilisée pour vider le tampon interne du flux et envoyer tous les octets en attente au flux sous-jacent. Cela garantit que tous les écrits en attente sont envoyés au flux. Une fois que Flush est appelé, tout écrit supplémentaire est directement écrit dans le flux sans être mis en mémoire tampon. L'appel à Flush est particulièrement utile lorsque vous souhaitez vous assurer que toutes les données écrites sont immédiatement écrites dans le flux sous-jacent, par exemple avant de fermer le StreamWriter.
C# (CSharp) System.IO.StreamWriter.Flush - 60 exemples trouvés. Ce sont les exemples réels les mieux notés de System.IO.StreamWriter.Flush extraits de projets open source. Vous pouvez noter les exemples pour nous aider à en améliorer la qualité.