dotnet / dotnet/dotnet-api-docs

ToString() on empty StringBuilder

Open
#1,665 1 comment 0 reactions 0 assignees View on GitHub
area-System.Runtime dotnet-api/prod Pri2 untriaged
Dominant language
C#
Stars
949
Forks
1.7k
Avg merge
3d 27m
Merged PRs (30d)
49

Description

What is returned by ToString() if no text was added to the StringBuilder, meaning if no Append*() or Insert() had been called? Will it return null or ""?

---
#### Document Details

⚠ *Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.*

* ID: ec97ffa5-4254-b02a-3e7b-34ff702071dc
* Version Independent ID: 074dc3c2-38e4-673e-0ef9-a3497771d63f
* Content: [StringBuilder.ToString Method (System.Text)](https://docs.microsoft.com/en-us/dotnet/api/system.text.stringbuilder.tostring?view=netframework-4.7.2)
* Content Source: [xml/System.Text/StringBuilder.xml](https://github.com/dotnet/dotnet-api-docs/blob/master/xml/System.Text/StringBuilder.xml)
* Product: **dotnet-api**
* GitHub Login: @dotnet-bot
* Microsoft Alias: **dotnetcontent**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.