Definition at line 1553 of file StringBuilder.cs.
1554 {
1556 {
1557 throw new ArgumentNullException("format");
1558 }
1559 int num = 0;
1561 char c = '\0';
1564 {
1566 }
1567 while (true)
1568 {
1570 {
1572 num++;
1573 if (c == '}')
1574 {
1576 {
1577 num++;
1578 }
1579 else
1580 {
1582 }
1583 }
1584 else if (c == '{')
1585 {
1587 {
1588 num--;
1590 }
1591 num++;
1592 }
1594 continue;
1595 }
1599 {
1600 break;
1601 }
1602 num++;
1603 if (num ==
length || (c =
format[num]) <
'0' || c >
'9')
1604 {
1606 }
1608 do
1609 {
1611 num++;
1613 {
1615 }
1617 }
1618 while (c >=
'0' && c <=
'9' &&
num2 < 1000000);
1620 {
1621 throw new FormatException(SR.Format_IndexOutOfRange);
1622 }
1623 for (; num <
length; num++)
1624 {
1625 if ((c =
format[num]) !=
' ')
1626 {
1627 break;
1628 }
1629 }
1630 bool flag = false;
1632 if (c == ',')
1633 {
1635 {
1636 }
1638 {
1640 }
1642 if (c == '-')
1643 {
1644 flag = true;
1645 num++;
1647 {
1649 }
1651 }
1652 if (c < '0' || c > '9')
1653 {
1655 }
1656 do
1657 {
1659 num++;
1661 {
1663 }
1665 }
1666 while (c >=
'0' && c <=
'9' &&
num3 < 1000000);
1667 }
1668 for (; num <
length; num++)
1669 {
1670 if ((c =
format[num]) !=
' ')
1671 {
1672 break;
1673 }
1674 }
1677 switch (c)
1678 {
1679 case ':':
1680 {
1681 num++;
1683 while (true)
1684 {
1686 {
1688 }
1690 switch (c)
1691 {
1692 case '{':
1695 default:
1697 case '}':
1698 break;
1699 }
1700 break;
1702 num++;
1703 }
1705 {
1707 }
1708 break;
1709 }
1710 default:
1712 break;
1713 case '}':
1714 break;
1715 }
1716 num++;
1718 string text2 =
null;
1720 {
1722 {
1724 }
1726 }
1728 {
1730 {
1732 {
1734 }
1737 if (flag &&
num5 > 0)
1738 {
1740 }
1741 continue;
1742 }
1744 {
1746 {
1748 }
1750 }
1751 else if (
obj !=
null)
1752 {
1754 }
1755 }
1757 {
1758 text =
string.Empty;
1759 }
1761 if (!flag &&
num6 > 0)
1762 {
1764 }
1766 if (flag &&
num6 > 0)
1767 {
1769 }
1770 }
1771 return this;
1772 }
static void FormatError()
Span< char > RemainingCurrentChunk
StringBuilder Append(char value, int repeatCount)
References System.Text.StringBuilder.Append(), System.Runtime.Serialization.Dictionary, System.format, System.SR.Format_IndexOutOfRange, System.Text.StringBuilder.FormatError(), System.length, System.Span< T >.Length, System.Text.StringBuilder.m_ChunkLength, System.obj, System.Text.StringBuilder.RemainingCurrentChunk, and System.text.
Referenced by System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), System.Text.StringBuilder.AppendFormat(), and System.Text.StringBuilder.AppendFormat().