La méthode EnsureCapacity de la classe System.Text.StringBuilder en C# permet de garantir qu'un objet StringBuilder dispose d'une capacité minimale spécifiée pour stocker des caractères. Si la capacité actuelle du StringBuilder est inférieure à la valeur spécifiée, la méthode augmentera automatiquement la capacité pour répondre à la demande. Cette méthode est utile lorsque vous prévoyez d'ajouter une grande quantité de texte à un objet StringBuilder et que vous voulez vous assurer qu'il dispose de suffisamment d'espace pour le stocker.
C# (CSharp) System.Text StringBuilder.EnsureCapacity - 42 exemples trouvés. Ce sont les exemples réels les mieux notés de System.Text.StringBuilder.EnsureCapacity extraits de projets open source. Vous pouvez noter les exemples pour nous aider à en améliorer la qualité.