207 writes to Length
aspire (9)
Aspire.Hosting (1)
dotnet-svcutil-lib (13)
GenerateDocumentationAndConfigFiles (2)
ILCompiler.TypeSystem (1)
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.Framework (2)
Microsoft.Build.Tasks.CodeAnalysis (2)
Microsoft.Build.Tasks.Core (3)
Microsoft.CodeAnalysis (5)
Microsoft.CodeAnalysis.Analyzers (2)
Microsoft.CodeAnalysis.AnalyzerUtilities (2)
Microsoft.CodeAnalysis.CSharp (3)
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.CodeAnalysis.ResxSourceGenerator (2)
Microsoft.CodeAnalysis.VisualBasic (1)
Microsoft.DotNet.Cli.Definitions (1)
Microsoft.Maui.Controls (2)
Microsoft.Maui.Controls.Xaml (1)
Microsoft.ML.Core (4)
Microsoft.ML.Data (6)
Microsoft.ML.Transforms (9)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TestPlatform.CommunicationUtilities (2)
Microsoft.VisualStudio.TestPlatform.Common (7)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (1)
Microsoft.Win32.Registry (2)
NuGet.Packaging (1)
PresentationBuildTasks (2)
PresentationCore (3)
PresentationFramework (5)
ReachFramework (3)
Roslyn.Diagnostics.Analyzers (2)
System.CommandLine (1)
System.Configuration.ConfigurationManager (2)
System.Console (1)
System.Data.Common (10)
System.Data.Odbc (6)
System.Data.OleDb (7)
System.Diagnostics.Process (2)
System.Diagnostics.TextWriterTraceListener (1)
System.Net.HttpListener (4)
System.Net.Primitives (1)
System.Private.CoreLib (4)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Globalization\DateTimeFormatInfoScanner.cs (1)
300dateWord.Length = 0;
System.Private.Xml (44)
System.ServiceModel.Primitives (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)
1040 references to Length
aspire (39)
Aspire.Cli.Tests (1)
Aspire.Dashboard (5)
Aspire.Hosting (6)
Aspire.Hosting.Azure.Kubernetes (2)
Aspire.Hosting.CodeGeneration.Go (2)
Aspire.Hosting.CodeGeneration.Java (5)
Aspire.Hosting.CodeGeneration.Python (9)
Aspire.Hosting.DevTunnels (1)
Aspire.Hosting.Java (5)
Aspire.Hosting.Radius (2)
Aspire.Hosting.Redis (1)
Aspire.Hosting.SqlServer (1)
Aspire.Hosting.Tests (2)
Aspire.TerminalHost (1)
dotnet-svcutil-lib (60)
GenerateDocumentationAndConfigFiles (4)
ILCompiler.TypeSystem (3)
illink (1)
Infrastructure.Common (1)
Infrastructure.Tests (1)
Microsoft.Analyzers.Extra (1)
Microsoft.AspNetCore.Components.Endpoints (2)
Microsoft.AspNetCore.Components.Testing (3)
Microsoft.AspNetCore.Components.WebAssembly (1)
Microsoft.AspNetCore.Diagnostics (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.Razor.Utilities.Shared (4)
Microsoft.AspNetCore.ResponseCaching (1)
Microsoft.AspNetCore.Routing (9)
Microsoft.AspNetCore.Server.IIS (1)
Microsoft.AspNetCore.SpaServices.Extensions (1)
Microsoft.AspNetCore.WebUtilities (1)
Microsoft.Build (8)
Microsoft.Build.Framework (3)
Microsoft.Build.Tasks.CodeAnalysis (5)
Microsoft.Build.Tasks.Core (10)
Microsoft.Build.Tasks.Git (6)
Microsoft.Build.Utilities.Core (4)
Microsoft.CodeAnalysis (19)
Microsoft.CodeAnalysis.Analyzers (6)
Microsoft.CodeAnalysis.AnalyzerUtilities (5)
Microsoft.CodeAnalysis.CodeStyle (7)
Microsoft.CodeAnalysis.CSharp (15)
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (1)
55if (builder.Length > 0)
Microsoft.CodeAnalysis.CSharp.Features (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (1)
55if (builder.Length > 0)
Microsoft.CodeAnalysis.Extensions.Package (3)
Microsoft.CodeAnalysis.Features (10)
Microsoft.CodeAnalysis.NetAnalyzers (2)
Microsoft.CodeAnalysis.Razor.Compiler (19)
Microsoft.CodeAnalysis.ResxSourceGenerator (5)
Microsoft.CodeAnalysis.Scripting (4)
Microsoft.CodeAnalysis.VisualBasic (7)
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (2)
Microsoft.CodeAnalysis.Workspaces (5)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (2)
Microsoft.Data.Analysis.Tests (1)
Microsoft.Diagnostics.DataContractReader.Legacy (5)
Microsoft.DotNet.Build.Manifest (2)
Microsoft.DotNet.Build.Tasks.Templating (1)
Microsoft.DotNet.Cli.Definitions (1)
Microsoft.DotNet.Cli.Utils (1)
Microsoft.DotNet.HotReload.Watch (1)
Microsoft.DotNet.PackageTesting (1)
Microsoft.DotNet.SharedFramework.Sdk (1)
Microsoft.DotNet.SourceBuild.Tasks (2)
Microsoft.Extensions.AI.Abstractions (1)
Microsoft.Extensions.AI.Evaluation.NLP (10)
Microsoft.Extensions.AI.OpenAI (1)
Microsoft.Extensions.Compliance.Abstractions (1)
Microsoft.Extensions.Compliance.Abstractions.Tests (1)
Microsoft.Extensions.Configuration.Binder.SourceGeneration (3)
Microsoft.Extensions.Configuration.Xml (2)
Microsoft.Extensions.DataIngestion (3)
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.ServiceDiscovery (1)
Microsoft.Extensions.ServiceDiscovery.Dns (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.Build.Containers (1)
Microsoft.Net.Http.Headers (2)
Microsoft.NET.Sdk.Publish.Tasks (2)
Microsoft.TemplateEngine.Cli (2)
Microsoft.TemplateEngine.Orchestrator.RunnableProjects (3)
Microsoft.TestPlatform.AdapterUtilities (7)
Microsoft.TestPlatform.CommunicationUtilities (2)
Microsoft.TestPlatform.CoreUtilities (3)
Microsoft.TestPlatform.Filter.Source (6)
Microsoft.TestPlatform.Utilities (2)
Microsoft.VisualBasic.Core (3)
Microsoft.VisualBasic.Forms (2)
Microsoft.VisualStudio.TestPlatform.Common (8)
Microsoft.VisualStudio.TestPlatform.Extensions.Trx.TestLogger (3)
Microsoft.Web.XmlTransform (5)
Microsoft.Win32.Registry (2)
NuGet.Commands (3)
NuGet.Common (2)
NuGet.Packaging (2)
NuGet.Protocol (2)
PresentationBuildTasks (17)
PresentationCore (7)
PresentationFramework (17)
ReachFramework (7)
Roslyn.Diagnostics.Analyzers (5)
Roslyn.Diagnostics.CSharp.Analyzers (2)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Formatting\CSharpFormattingOptions2.Parsers.cs (1)
55if (builder.Length > 0)
Roslyn.Diagnostics.VisualBasic.Analyzers (2)
Security.TransportSecurity.IntegrationTests (4)
System.CommandLine (1)
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.Data.OleDb (15)
System.Diagnostics.DiagnosticSource (1)
System.Diagnostics.EventLog (3)
System.Diagnostics.Process (2)
System.DirectoryServices (3)
System.DirectoryServices.AccountManagement (8)
System.DirectoryServices.Protocols (1)
System.IO.Ports (3)
System.Net.Http (2)
System.Net.Http.WinHttpHandler (2)
System.Net.HttpListener (6)
System.Net.Mail (3)
System.Net.Primitives (2)
System.Net.Requests (3)
System.Private.CoreLib (81)
src\runtime\src\libraries\System.Private.CoreLib\src\System\Text\StringBuilder.cs (51)
276if (value < Length)
319if (Length == 0)
324string result = string.FastAllocateString(Length);
360int currentLength = this.Length;
402/// After the call, <paramref name="source"/> has <see cref="Length"/> and
445int delta = value - Length;
457int capacityToPreserve = Math.Min(Capacity, Math.Max(Length * 6 / 5, m_ChunkChars.Length));
481Debug.Assert(Length == value, "Something went wrong setting Length.");
490if ((uint)index >= (uint)Length)
500if ((uint)index >= (uint)Length)
712if ((uint)(repeatCount + Length) > (uint)m_MaxCapacity)
820if (value != null && value.Length != 0)
822return AppendCore(value, 0, value.Length);
846if (count > value.Length - startIndex)
861int newLength = Length + count;
913if ((uint)sourceIndex > (uint)Length)
918if (sourceIndex > Length - count)
964int currentLength = Length;
978if (insertingChars > MaxCapacity - this.Length)
982Debug.Assert(insertingChars + this.Length < int.MaxValue);
1005if (length > Length - startIndex)
1010if (Length == length && startIndex == 0)
1333if ((uint)index > (uint)Length)
1360if ((uint)index > (uint)Length)
1386if ((uint)index > (uint)Length)
1400int currentLength = Length;
1453if ((uint)index > (uint)Length)
1992public StringBuilder Replace(string oldValue, string? newValue) => Replace(oldValue, newValue, 0, Length);
2003public StringBuilder Replace(ReadOnlySpan<char> oldValue, ReadOnlySpan<char> newValue) => Replace(oldValue, newValue, 0, Length);
2015if (Length != sb.Length)
2075if (span.Length != Length)
2098Debug.Assert(offset == Length);
2132int currentLength = Length;
2249return Replace(oldChar, newChar, 0, Length);
2261int currentLength = Length;
2309return Replace(oldRune, newRune, 0, Length);
2388int newLength = Length + valueCount;
2422Debug.Assert((uint)index <= (uint)Length, "Callers should check that index is a legal value.");
2590Debug.Assert(0 <= index && index <= Length);
2632Debug.Assert(Capacity == Length, nameof(ExpandByABlock) + " should only be called when there is no space left.");
2637if ((minBlockCharCount + Length) > m_MaxCapacity || minBlockCharCount + Length < minBlockCharCount)
2646int newBlockLength = Math.Max(minBlockCharCount, Math.Min(Length, MaxChunkSize));
2726if (count + Length > m_MaxCapacity || count + Length < count)
2818Debug.Assert(startIndex >= 0 && startIndex < Length);
2914ArgumentOutOfRangeException.ThrowIfGreaterThanOrEqual(index, Length);
2918Span<char> chars = index + 1 < Length
3158int start = _stringBuilder.Length;
3160int paddingRequired = -alignment - (_stringBuilder.Length - start);
System.Private.DataContractSerialization (4)
System.Private.StackTraceMetadata (8)
System.Private.Uri (1)
System.Private.Xml (66)
System.Private.Xml.Linq (1)
System.Reflection.Emit (2)
System.Reflection.Metadata (2)
System.Runtime.Serialization.Formatters (1)
System.Runtime.Serialization.Schema (11)
System.Security.Cryptography.Xml (4)
System.ServiceModel.NetFramingBase (4)
System.ServiceModel.NetTcp (1)
System.ServiceModel.Primitives (10)
System.ServiceModel.Primitives.Tests (1)
System.ServiceModel.Syndication (5)
System.Speech (13)
System.Text.Json (2)
System.Text.Json.SourceGeneration (2)
System.Text.RegularExpressions (10)
System.Text.RegularExpressions.Generator (11)
System.Web.HttpUtility (2)
System.Windows.Forms (10)
System.Windows.Forms.Analyzers.CSharp (1)
System.Windows.Forms.Design (2)
System.Windows.Input.Manipulations (3)
System.Xaml (7)
UnitTests.Common (2)
VBCSCompiler (1)