192 writes to Length
dotnet-svcutil-lib (13)
Metrics (2)
Metrics.Legacy (2)
Microsoft.AspNetCore.Authentication.Twitter (3)
Microsoft.AspNetCore.JsonPatch (1)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (1)
Microsoft.AspNetCore.Mvc.Core (1)
Microsoft.AspNetCore.Mvc.Razor (1)
Microsoft.AspNetCore.Routing (1)
Microsoft.Build (3)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.Core (4)
Microsoft.Build.Utilities.Core (1)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.BannedApiAnalyzers (2)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.PublicApiAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.Test.Utilities (1)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (2)
Microsoft.DotNet.ArcadeLogging (1)
Microsoft.DotNet.Helix.Sdk (1)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.ML.Core (4)
Microsoft.ML.Data (6)
Microsoft.ML.Transforms (9)
Microsoft.NET.StringTools.net35 (1)
MSBuild (1)
MSBuildTaskHost (2)
PresentationBuildTasks (2)
PresentationCore (3)
PresentationFramework (5)
ReachFramework (3)
Roslyn.Diagnostics.Analyzers (2)
RunTests (1)
System.Configuration.ConfigurationManager (2)
System.Console (1)
System.Data.Common (10)
System.Data.Odbc (6)
System.Diagnostics.Process (2)
System.Diagnostics.TextWriterTraceListener (1)
System.Net.HttpListener (4)
System.Net.Primitives (1)
System.Private.CoreLib (3)
src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfoScanner.cs (1)
310dateWord.Length = 0;
System.Private.Xml (44)
System.Security.Cryptography (1)
System.Text.Json (1)
System\Text\Json\Serialization\Metadata\JsonTypeInfoResolverChain.cs (1)
67sb.Length -= 2;
System.Text.Json.SourceGeneration (2)
System.Windows.Forms (3)
System.Windows.Input.Manipulations (3)
Test.Utilities (2)
Text.Analyzers (2)
814 references to Length
Aspire.Dashboard (2)
Aspire.Hosting (1)
Aspire.Hosting.Redis (1)
Aspire.Hosting.SqlServer (1)
CSharpSyntaxGenerator (1)
dotnet-svcutil-lib (60)
illink (1)
Infrastructure.Common (1)
InMemory.FunctionalTests (1)
installer.tasks (1)
InteractiveHost.UnitTests (1)
Metrics (1)
Metrics.Legacy (1)
Microsoft.Analyzers.Extra (1)
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
Microsoft.AspNetCore.Components.Endpoints (1)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Diagnostics (1)
Microsoft.AspNetCore.Grpc.Swagger (1)
Microsoft.AspNetCore.Hosting (1)
Microsoft.AspNetCore.Http.Extensions (1)
Microsoft.AspNetCore.InternalTesting (2)
Microsoft.AspNetCore.JsonPatch (2)
Microsoft.AspNetCore.JsonPatch.SystemTextJson (2)
Microsoft.AspNetCore.Mvc.Abstractions (1)
Microsoft.AspNetCore.Mvc.Core (4)
Microsoft.AspNetCore.OpenApi (1)
Microsoft.AspNetCore.OutputCaching (1)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Routing (9)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.Shared.Tests (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.WebSockets.ConformanceTests (1)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.Build (7)
Microsoft.Build.Framework (3)
Microsoft.Build.Tasks.CodeAnalysis (5)
Microsoft.Build.Tasks.Core (11)
Microsoft.Build.UnitTests.Shared (2)
Microsoft.Build.Utilities.Core (4)
Microsoft.CodeAnalysis (19)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (1)
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.Collections.Package (2)
Microsoft.CodeAnalysis.CSharp (21)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.Debugging.Package (1)
Microsoft.CodeAnalysis.EditorFeatures (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (8)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (3)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Microsoft.CodeAnalysis.ExternalAccess.Razor.UnitTests (2)
Microsoft.CodeAnalysis.Features (2)
Microsoft.CodeAnalysis.InteractiveHost (1)
Microsoft.CodeAnalysis.PooledObjects.Package (2)
Microsoft.CodeAnalysis.PublicApiAnalyzers (1)
Microsoft.CodeAnalysis.ResxSourceGenerator (1)
Microsoft.CodeAnalysis.Scripting (4)
Microsoft.CodeAnalysis.Scripting.TestUtilities (1)
Microsoft.CodeAnalysis.Test.Utilities (3)
Microsoft.CodeAnalysis.Threading.Package (2)
Microsoft.CodeAnalysis.VisualBasic (7)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
Microsoft.CodeAnalysis.VisualBasic.ExpressionCompiler (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (9)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (2)
Microsoft.Data.Analysis.Tests (1)
Microsoft.DotNet.Build.Manifest (2)
Microsoft.DotNet.Build.Tasks.Templating (1)
Microsoft.DotNet.Helix.Sdk (2)
Microsoft.DotNet.Open.Api.Tools.Tests (1)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.RemoteExecutor (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.SignCheckLibrary (1)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.Extensions.ApiDescription.Tool.Tests (1)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Configuration.Xml (2)
Microsoft.Extensions.DependencyInjection (1)
Microsoft.Extensions.Diagnostics.Abstractions (1)
Microsoft.Extensions.Diagnostics.HealthChecks (1)
Microsoft.Extensions.FileProviders.Embedded (2)
Microsoft.Extensions.Http (1)
Microsoft.Extensions.Logging.Abstractions (1)
Microsoft.Extensions.Logging.Console (2)
Microsoft.Extensions.SecretManager.Tools.Tests (1)
Microsoft.Extensions.ServiceDiscovery (1)
Microsoft.Extensions.Telemetry (4)
Microsoft.Extensions.Telemetry.Abstractions (2)
Microsoft.Extensions.Telemetry.Tests (4)
Microsoft.Gen.MetadataExtractor (1)
Microsoft.Gen.Metrics (1)
Microsoft.Gen.MetricsReports (1)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Controls.Xaml (2)
Microsoft.ML.AutoML.SourceGenerator (5)
Microsoft.ML.CodeGenerator (17)
CodeGenerator\CSharp\TransformGenerators.cs (6)
62sb.Remove(sb.Length - 1, 1); // remove extra ,
93sb.Remove(sb.Length - 1, 1);
198sb.Remove(sb.Length - 1, 1); // remove extra ,
232sb.Remove(sb.Length - 1, 1); // remove extra ,
267sb.Remove(sb.Length - 1, 1); // remove extra ,
325sb.Remove(sb.Length - 1, 1); // remove extra ,
Microsoft.ML.Core (27)
Microsoft.ML.Data (19)
Microsoft.ML.FastTree (1)
Microsoft.ML.InternalCodeAnalyzer (1)
Microsoft.ML.Maml (2)
Microsoft.ML.Parquet (2)
Microsoft.ML.PerformanceTests (2)
Microsoft.ML.Samples (1)
Microsoft.ML.TestFramework (1)
Microsoft.ML.Transforms (17)
Microsoft.Net.Http.Headers (2)
Microsoft.NET.StringTools.net35 (4)
Microsoft.VisualBasic.Core (3)
Microsoft.VisualBasic.Forms (2)
PresentationBuildTasks (17)
PresentationCore (7)
PresentationFramework (17)
ReachFramework (7)
Roslyn.Diagnostics.Analyzers (1)
Roslyn.Test.PdbUtilities (2)
Roslyn.VisualStudio.Next.UnitTests (1)
RulesetToEditorconfigConverter (1)
Security.TransportSecurity.IntegrationTests (4)
System.ComponentModel.Composition (3)
System.ComponentModel.TypeConverter (47)
System\ComponentModel\MaskedTextProvider.cs (47)
428_testString.Capacity = _testString.Length;
490for (int position = 0; position < _testString.Length; position++)
616public int LastAssignedPosition => FindAssignedEditPositionFrom(_testString.Length - 1, BACKWARD);
621public int Length => _testString.Length;
712for (int position = 0; position < _testString.Length; position++)
792if (index < 0 || index >= _testString.Length)
825if (lastAssignedPos == _testString.Length - 1) // at the last edit char position.
827testPosition = _testString.Length;
839testPosition = _testString.Length;
907for (int position = 0; position < _testString.Length; position++)
931endPosition = _testString.Length - 1;
971endPosition = _testString.Length - 1;
1064endPosition = _testString.Length - 1;
1099if (endPosition >= _testString.Length)
1101endPosition = _testString.Length - 1;
1140endPosition = _testString.Length - 1;
1202if (position < 0 || position >= _testString.Length)
1245if (position < 0 || position >= _testString.Length)
1266Debug.Assert(input != null && position >= 0 && position < _testString.Length, "input param out of range.");
1287if (shiftNeeded && (testPosition == _testString.Length - 1)) // no room for shifting.
1290testPosition = _testString.Length;
1307testPosition = _testString.Length;
1394if (position < 0 || position >= _testString.Length)
1408if (position < 0 || position >= _testString.Length)
1526if (endPosition >= _testString.Length)
1554Debug.Assert(startPosition >= 0 && startPosition <= endPosition && endPosition < _testString.Length, "Out of range input value.");
1688if (position < 0 || position >= _testString.Length)
1732if (endPosition >= _testString.Length)
1779if (position < 0 || position >= _testString.Length)
1814if (endPosition >= _testString.Length)
1883testPosition = _testString.Length;
1956Debug.Assert(startPosition >= 0 && endPosition >= 0 && endPosition >= startPosition && endPosition < _testString.Length, "position out of range.");
2013ResetString(resetPos, _testString.Length - 1);
2025Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2037Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2162Debug.Assert(position >= 0 && position < _testString.Length, "Position out of range.");
2437if (testPosition >= _testString.Length)
2450testPosition = _testString.Length;
2489StringBuilder st = new StringBuilder(_testString.Length);
2491for (int position = 0; position < _testString.Length; position++)
2506return ToString(/*ignorePwdChar*/ true, IncludePrompt, IncludeLiterals, 0, _testString.Length);
2515return ToString(ignorePasswordChar, IncludePrompt, IncludeLiterals, 0, _testString.Length);
2545return ToString( /*ignorePwdChar*/ true, includePrompt, includeLiterals, 0, _testString.Length);
2575if (startPosition >= _testString.Length)
2580int maxLength = _testString.Length - startPosition;
2672if (position < 0 || position >= _testString.Length)
2686if (position < 0 || position >= _testString.Length)
System.Configuration.ConfigurationManager (14)
System.Console (4)
System.Data.Common (6)
System.Data.Odbc (12)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.Process (2)
System.IO.FileSystem.Watcher (2)
System.IO.Ports (3)
System.Net.Http (2)
System.Net.HttpListener (6)
System.Net.Mail (5)
System.Net.Primitives (2)
System.Net.Requests (2)
System.Net.WebSockets.Client (1)
System.Private.CoreLib (69)
src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (45)
274if (value < Length)
317if (Length == 0)
322string result = string.FastAllocateString(Length);
358int currentLength = this.Length;
405int delta = value - Length;
417int capacityToPreserve = Math.Min(Capacity, Math.Max(Length * 6 / 5, m_ChunkChars.Length));
441Debug.Assert(Length == value, "Something went wrong setting Length.");
687if ((uint)(repeatCount + Length) > (uint)m_MaxCapacity)
795if (value != null && value.Length != 0)
797return AppendCore(value, 0, value.Length);
821if (count > value.Length - startIndex)
836int newLength = Length + count;
888if ((uint)sourceIndex > (uint)Length)
893if (sourceIndex > Length - count)
939int currentLength = Length;
953if (insertingChars > MaxCapacity - this.Length)
957Debug.Assert(insertingChars + this.Length < int.MaxValue);
980if (length > Length - startIndex)
985if (Length == length && startIndex == 0)
1294if ((uint)index > (uint)Length)
1321if ((uint)index > (uint)Length)
1332if ((uint)index > (uint)Length)
1346int currentLength = Length;
1399if ((uint)index > (uint)Length)
1942public StringBuilder Replace(string oldValue, string? newValue) => Replace(oldValue, newValue, 0, Length);
1953public StringBuilder Replace(ReadOnlySpan<char> oldValue, ReadOnlySpan<char> newValue) => Replace(oldValue, newValue, 0, Length);
1965if (Length != sb.Length)
2025if (span.Length != Length)
2048Debug.Assert(offset == Length);
2082int currentLength = Length;
2199return Replace(oldChar, newChar, 0, Length);
2211int currentLength = Length;
2304int newLength = Length + valueCount;
2338Debug.Assert((uint)index <= (uint)Length, "Callers should check that index is a legal value.");
2506Debug.Assert(0 <= index && index <= Length);
2548Debug.Assert(Capacity == Length, nameof(ExpandByABlock) + " should only be called when there is no space left.");
2553if ((minBlockCharCount + Length) > m_MaxCapacity || minBlockCharCount + Length < minBlockCharCount)
2562int newBlockLength = Math.Max(minBlockCharCount, Math.Min(Length, MaxChunkSize));
2642if (count + Length > m_MaxCapacity || count + Length < count)
2734Debug.Assert(startIndex >= 0 && startIndex < Length);
3012int start = _stringBuilder.Length;
3014int paddingRequired = -alignment - (_stringBuilder.Length - start);
System.Private.DataContractSerialization (4)
System.Private.Uri (1)
System.Private.Xml (66)
System.Reflection.Emit (2)
System.Reflection.Metadata (2)
System.Runtime.Serialization.Formatters (1)
System.Runtime.Serialization.Schema (11)
System.Security.Cryptography (3)
System.Security.Cryptography.Xml (4)
System.ServiceModel.NetFramingBase (4)
System.ServiceModel.Primitives.Tests (1)
System.ServiceModel.Syndication (5)
System.Text.Json (1)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (9)
System.Text.RegularExpressions.Generator (11)
System.Web.HttpUtility (2)
System.Web.Services.Description (1)
System.Windows.Forms (10)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Design (2)
System.Windows.Input.Manipulations (3)
System.Xaml (7)
Test.Utilities (1)
Text.Analyzers (1)
UnitTests.Common (2)
xunit.assert (1)
xunit.console (2)