If you look at the StringBuilder documentation , it has only 4 properties. One of them is Length.
The length of a StringBuilder object is determined by its number of Char objects.
Length:
StringBuilder.
StringBuilder sb = new StringBuilder();
if (sb.Length != 0)
{
}
, String.IsNullOrEmpty ToString . , , :
string difference = "";
if (!String.IsNullOrEmpty(difference = sb.ToString()))
{
Console.WriteLine(difference);
}