9 writes to Length
System.Private.CoreLib (9)
src\libraries\Common\src\System\IO\PathInternal.cs (2)
176sb.Length = (i + 3 >= path.Length && s == skip) ? s + 1 : s; // to avoid removing the complete "\tmp\" segment in cases like \\?\C:\tmp\..\, C:\tmp\.. 182sb.Length = skip;
src\libraries\System.Private.CoreLib\src\System\AggregateException.cs (1)
357sb.Length--;
src\libraries\System.Private.CoreLib\src\System\Environment.Variables.Windows.cs (1)
29builder.Length = (int)length;
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (1)
524sb.Length = 0;
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (2)
727sb.Length = Path.GetDirectoryNameOffset(sb.AsSpan()); 732sb.Length = 0;
src\libraries\System.Private.CoreLib\src\System\Net\WebUtility.cs (1)
141output.Length -= (MaxInt32Digits - charsWritten);
src\libraries\System.Private.CoreLib\src\System\Text\CompositeFormat.cs (1)
170vsb.Length = 0;
17 references to Length
System.Private.CoreLib (17)
src\libraries\Common\src\System\IO\PathInternal.cs (3)
172for (s = sb.Length - 1; s >= skip; s--) 201if (!flippedSeparator && sb.Length == path.Length) 207if (skip != rootLength && sb.Length < rootLength)
src\libraries\Common\src\System\Reflection\AssemblyNameParser.cs (1)
492int length = sb.Length;
src\libraries\Common\src\System\Text\ValueStringBuilder.cs (1)
68/// Does not ensure there is a null char after <see cref="Length"/>
src\libraries\System.Private.CoreLib\src\System\Globalization\TimeSpanFormat.cs (5)
551Debug.Assert((field == 0 && sb.Length == 0) || field == 1, "field == 0 || field == 1, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern"); 559Debug.Assert((field == 1 && sb.Length == 0) || field == 2, "field == 1 || field == 2, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern"); 567Debug.Assert((field == 2 && sb.Length == 0) || field == 3, "field == 2 || field == 3, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern"); 575Debug.Assert((field == 3 && sb.Length == 0) || field == 4, "field == 3 || field == 4, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern"); 584Debug.Assert((field == 4 && sb.Length == 0) || field == 5, "field == 4 || field == 5, Bug in DateTimeFormatInfo.FullTimeSpan[Positive|Negative]Pattern");
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (1)
713Debug.Assert(sb.Length > 0);
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (3)
424if (builder.Length == 0) 565if (builder.Length == 0) 938if (sb.Length > 0)
src\libraries\System.Private.CoreLib\src\System\IO\StreamReader.cs (1)
817if (vsb.Length == 0)
src\libraries\System.Private.CoreLib\src\System\PasteArguments.cs (1)
12if (stringBuilder.Length != 0)
src\libraries\System.Reflection.Metadata\src\System\Reflection\Metadata\TypeName.cs (1)
222builder[builder.Length - 1] = ']'; // replace ',' with ']'