Die Methode EnsureCapacity der C#-Klasse System.Text.StringBuilder stellt sicher, dass der interne Puffer des StringBuilders eine bestimmte Kapazität hat. Wenn die aktuelle Kapazität des Puffers kleiner als die angegebene Kapazität ist, wird der interne Puffer vergrößert, um Platz für zusätzliche Zeichen zu schaffen. Dadurch kann die Leistung bei der Arbeit mit großen Zeichenketten verbessert werden, indem unnötige Pufferoperationen vermieden werden.
C# (CSharp) System.Text StringBuilder.EnsureCapacity - 42 Beispiele gefunden. Dies sind die am besten bewerteten C# (CSharp) Beispiele für die System.Text.StringBuilder.EnsureCapacity, die aus Open Source-Projekten extrahiert wurden. Sie können Beispiele bewerten, um die Qualität der Beispiele zu verbessern.