342 references to GetLength
dotnet-svcutil-lib (7)
FrameworkFork\System.Runtime.Serialization\System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
461IncrementCollectionCount(xmlWriter, array.GetLength(0));
FrameworkFork\System.ServiceModel\System\IdentityModel\Tokens\WSSecurityJan2004.cs (3)
97_valueTypeUris = new string[valueTypeUris.GetLength(0)]; 98for (int i = 0; i < _valueTypeUris.GetLength(0); ++i) 108for (int i = 0; i < _valueTypeUris.GetLength(0); ++i)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\WSSecurityJan2004.cs (3)
86_valueTypeUris = new string[valueTypeUris.GetLength(0)]; 87for (int i = 0; i < _valueTypeUris.GetLength(0); ++i) 97for (int i = 0; i < _valueTypeUris.GetLength(0); ++i)
Microsoft.Build (1)
FrameworkLocationHelper.cs (1)
1462for (int i = 0; i < s_explicitFallbackRulesForPathToDotNetFrameworkSdkTools.GetLength(0); ++i)
Microsoft.Build.Engine.UnitTests (1)
Scanner_Tests.cs (1)
51for (int i = 0; i < tests.GetLength(0); i++)
Microsoft.Build.Tasks.Core (4)
AssignProjectConfiguration.cs (2)
181var resolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0)); 182var unresolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0));
ResolveNonMSBuildProjectOutput.cs (2)
93var resolvedPaths = new List<ITaskItem>(ProjectReferences.GetLength(0)); 94var unresolvedReferences = new List<ITaskItem>(ProjectReferences.GetLength(0));
Microsoft.Build.Utilities.Core (1)
FrameworkLocationHelper.cs (1)
1462for (int i = 0; i < s_explicitFallbackRulesForPathToDotNetFrameworkSdkTools.GetLength(0); ++i)
Microsoft.CodeAnalysis.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
142var width = matrix.GetLength(0); 143var height = matrix.GetLength(1);
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
Semantics\NullableTests.cs (1)
1287for (int i = 0; i < types.GetLength(0); ++i)
Microsoft.CodeAnalysis.Scripting (1)
Hosting\ObjectFormatter\CommonTypeNameFormatter.cs (1)
173int length = arrayOpt.GetLength(i);
Microsoft.CodeAnalysis.VisualBasic (4)
Preprocessor\ExpressionEvaluator.vb (4)
64Debug.Assert(s_dominantType.GetLength(0) = s_dominantType.GetLength(1)) ' 2d array must be square 65For i As Integer = 0 To s_dominantType.GetLength(0) - 1 66For j As Integer = i + 1 To s_dominantType.GetLength(1) - 1
Microsoft.CodeAnalysis.Workspaces (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Utilities\EditDistance.cs (2)
142var width = matrix.GetLength(0); 143var height = matrix.GetLength(1);
Microsoft.ML.Core (1)
Utilities\BigArray.cs (1)
242int curBlockCount = _entries.GetLength(0);
Microsoft.ML.KMeansClustering (5)
KMeansPlusPlusTrainer.cs (5)
621Contracts.Assert(0 <= bestCluster && bestCluster < _clusterDistances.GetLength(1), "bestCluster must be between 0..clusterCount-1"); 638Contracts.Assert(0 <= newClusterIdxWithinSample && newClusterIdxWithinSample < _clusterDistances.GetLength(0), "newClusterIdxWithinSample must be between 0..numSamplesPerRound-1"); 639Contracts.Assert(0 <= oldClusterIdx && oldClusterIdx < _clusterDistances.GetLength(1)); 654Contracts.Assert(0 <= newClusterIdxWithinSample && newClusterIdxWithinSample < _clusterDistances.GetLength(0), 657(0 <= bestOldCluster && bestOldCluster < _clusterDistances.GetLength(1))),
Microsoft.ML.TimeSeries (1)
SrCnnEntireAnomalyDetector.cs (1)
620for (int i = 0; i < results.GetLength(0); ++i)
Microsoft.VisualBasic.Core (2)
Microsoft\VisualBasic\CompilerServices\Utils.vb (2)
103Dim lenSrcLastRank As Integer = arySrc.GetLength(lastRank - 1) 104Dim lenDestLastRank As Integer = aryDest.GetLength(lastRank - 1)
Microsoft.VisualBasic.Forms (3)
Microsoft\VisualBasic\ApplicationServices\ConsoleApplicationBase.vb (3)
55If envArgs.GetLength(0) >= 2 Then '1 element means no args, just the executing program. >= 2 means executing program + one or more command line arguments 56Dim newArgs(envArgs.GetLength(0) - 2) As String 'dimming z(0) gives a z() of 1 element. 57Array.Copy(envArgs, 1, newArgs, 0, envArgs.GetLength(0) - 1) 'copy everything but the 0th element (the path of the executing program)
PresentationCore (13)
MS\Internal\IO\Packaging\ByteRangeDownloader.cs (7)
195Debug.Assert(byteRanges.GetLength(0) == 1, "We don't support a request with multiple byte ranges"); 222for (int i = 0; i < byteRanges.GetLength(0); ++i) 272for (int i=0, j=0; i < inByteRanges.GetLength(0); ++i, ++j) 461for (int i = 0; i < byteRanges.GetLength(0); ++i) 726if (byteRanges.GetLength(0) <= 0 || byteRanges.GetLength(1) != 2) 731for (int i = 0; i < byteRanges.GetLength(0); ++i)
MS\Internal\IO\Packaging\NetStream.cs (2)
680if (ranges.GetLength(0) > 0) 691while (r < ranges.GetLength(0))
System\Windows\Media\Imaging\PropVariant.cs (1)
274String[] strArray = new String[charArray.GetLength(0)];
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
1088int firstDimLength = sourceBuffer.GetLength(0); 1115int firstDimLength = sourceBuffer.GetLength(0); 1116int secondDimLength = sourceBuffer.GetLength(1);
System.ComponentModel.TypeConverter (3)
System\ComponentModel\ArrayConverter.cs (3)
44int length = valueArray.GetLength(0); 75if (instance is Array array && array.GetLength(0) > _index) 87if (array.GetLength(0) > _index)
System.IO.Packaging (1)
System\IO\Packaging\PackageXmlStringTable.cs (1)
85for (int i = 1; i < s_xmlstringtable.GetLength(0); i++)
System.Linq.Parallel (2)
System\Linq\Parallel\Partitioning\HashRepartitionEnumerator.cs (1)
74Debug.Assert(valueExchangeMatrix.GetLength(0) == partitionCount, "expected square matrix of buffers (NxN)");
System\Linq\Parallel\Partitioning\OrderedHashRepartitionEnumerator.cs (1)
76Debug.Assert(valueExchangeMatrix.GetLength(0) == partitionCount, "expected square matrix of buffers (NxN)");
System.Numerics.Tensors (12)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (3)
144public ReadOnlyTensorSpan(Array? array) : this(array, ReadOnlySpan<int>.Empty, array == null ? [0] : (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(), []) { } 156lengths = (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(); 200lengths = (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray();
System\Numerics\Tensors\netcore\TensorSpan.cs (3)
147public TensorSpan(Array? array) : this(array, ReadOnlySpan<int>.Empty, array == null ? [0] : (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(), []) { } 159lengths = (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray(); 204lengths = (from dim in Enumerable.Range(0, array.Rank) select (nint)array.GetLength(dim)).ToArray();
System\Numerics\Tensors\netcore\TensorSpanHelpers.cs (6)
135if ((indexes[i] != 0 && indexes[i] >= array.GetLength(i)) || indexes[i] < 0) 137index += array.GetLength(i) * indexes[i]; 156nint index = indexes[indexes.Length - 1].GetOffset(array.GetLength(indexes.Length - 1)); 159nint offset = indexes[i].GetOffset(array.GetLength(i)); 160if ((offset != 0 && offset >= array.GetLength(i)) || offset < 0) 162index += array.GetLength(i) * offset;
System.Private.CoreLib (1)
src\libraries\System.Private.CoreLib\src\System\Array.cs (1)
620return GetLength(dimension);
System.Private.DataContractSerialization (1)
System\Runtime\Serialization\XmlObjectSerializerWriteContext.cs (1)
418IncrementCollectionCount(xmlWriter, array.GetLength(0));
System.Private.Windows.Core (1)
Windows\Win32\System\Variant\VARIANT.cs (1)
518multiplier *= array.GetLength(i - 1);
System.ServiceModel.Primitives (6)
System\IdentityModel\Tokens\WSSecurityJan2004.cs (3)
85_valueTypeUris = new string[valueTypeUris.GetLength(0)]; 86for (int i = 0; i < _valueTypeUris.GetLength(0); ++i) 98for (int i = 0; i < _valueTypeUris.GetLength(0); ++i)
System\ServiceModel\Security\WSSecurityJan2004.cs (3)
72_valueTypeUris = new string[valueTypeUris.GetLength(0)]; 73for (int i = 0; i < _valueTypeUris.GetLength(0); ++i) 85for (int i = 0; i < _valueTypeUris.GetLength(0); ++i)
System.Windows.Forms.Design (2)
System\ComponentModel\Design\ArrayEditor.cs (1)
34object[] items = new object[valueArray.GetLength(0)];
System\Windows\Forms\Design\StringArrayEditor.cs (1)
28object[] items = new object[valueArray.GetLength(0)];
System.Windows.Forms.Primitives.Tests (260)
Interop\Oleaut32\VARIANTTests.cs (260)
2011Assert.Equal(result.Length, array.GetLength(0)); 2030Assert.Equal(result.Length, array.GetLength(0)); 2064Assert.Equal(result.GetLength(0), array.GetLength(0)); 2065Assert.Equal(result.GetLength(1), array.GetLength(1)); 2083Assert.Equal(result.GetLength(0), array.GetLength(0)); 2084Assert.Equal(result.GetLength(1), array.GetLength(1)); 2100Assert.Equal(result.Length, array.GetLength(0)); 2117Assert.Equal(result.Length, array.GetLength(0)); 2155Assert.Equal(result.GetLength(0), array.GetLength(0)); 2156Assert.Equal(result.GetLength(1), array.GetLength(1)); 2182Assert.Equal(result.GetLength(0), array.GetLength(0)); 2183Assert.Equal(result.GetLength(1), array.GetLength(1)); 2207Assert.Equal(result.Length, array.GetLength(0)); 2232Assert.Equal(result.Length, array.GetLength(0)); 2270Assert.Equal(result.GetLength(0), array.GetLength(0)); 2271Assert.Equal(result.GetLength(1), array.GetLength(1)); 2297Assert.Equal(result.GetLength(0), array.GetLength(0)); 2298Assert.Equal(result.GetLength(1), array.GetLength(1)); 2322Assert.Equal(result.Length, array.GetLength(0)); 2347Assert.Equal(result.Length, array.GetLength(0)); 2385Assert.Equal(result.GetLength(0), array.GetLength(0)); 2386Assert.Equal(result.GetLength(1), array.GetLength(1)); 2412Assert.Equal(result.GetLength(0), array.GetLength(0)); 2413Assert.Equal(result.GetLength(1), array.GetLength(1)); 2437Assert.Equal(result.Length, array.GetLength(0)); 2462Assert.Equal(result.Length, array.GetLength(0)); 2500Assert.Equal(result.GetLength(0), array.GetLength(0)); 2501Assert.Equal(result.GetLength(1), array.GetLength(1)); 2527Assert.Equal(result.GetLength(0), array.GetLength(0)); 2528Assert.Equal(result.GetLength(1), array.GetLength(1)); 2552Assert.Equal(result.Length, array.GetLength(0)); 2577Assert.Equal(result.Length, array.GetLength(0)); 2602Assert.Equal(result.GetLength(0), array.GetLength(0)); 2603Assert.Equal(result.GetLength(1), array.GetLength(1)); 2629Assert.Equal(result.GetLength(0), array.GetLength(0)); 2630Assert.Equal(result.GetLength(1), array.GetLength(1)); 2654Assert.Equal(result.Length, array.GetLength(0)); 2679Assert.Equal(result.Length, array.GetLength(0)); 2717Assert.Equal(result.GetLength(0), array.GetLength(0)); 2718Assert.Equal(result.GetLength(1), array.GetLength(1)); 2744Assert.Equal(result.GetLength(0), array.GetLength(0)); 2745Assert.Equal(result.GetLength(1), array.GetLength(1)); 2769Assert.Equal(result.Length, array.GetLength(0)); 2794Assert.Equal(result.Length, array.GetLength(0)); 2819Assert.Equal(result.GetLength(0), array.GetLength(0)); 2820Assert.Equal(result.GetLength(1), array.GetLength(1)); 2846Assert.Equal(result.GetLength(0), array.GetLength(0)); 2847Assert.Equal(result.GetLength(1), array.GetLength(1)); 2871Assert.Equal(result.Length, array.GetLength(0)); 2896Assert.Equal(result.Length, array.GetLength(0)); 2934Assert.Equal(result.GetLength(0), array.GetLength(0)); 2935Assert.Equal(result.GetLength(1), array.GetLength(1)); 2961Assert.Equal(result.GetLength(0), array.GetLength(0)); 2962Assert.Equal(result.GetLength(1), array.GetLength(1)); 2986Assert.Equal(result.Length, array.GetLength(0)); 3011Assert.Equal(result.Length, array.GetLength(0)); 3036Assert.Equal(result.GetLength(0), array.GetLength(0)); 3037Assert.Equal(result.GetLength(1), array.GetLength(1)); 3063Assert.Equal(result.GetLength(0), array.GetLength(0)); 3064Assert.Equal(result.GetLength(1), array.GetLength(1)); 3088Assert.Equal(result.Length, array.GetLength(0)); 3113Assert.Equal(result.Length, array.GetLength(0)); 3151Assert.Equal(result.GetLength(0), array.GetLength(0)); 3152Assert.Equal(result.GetLength(1), array.GetLength(1)); 3178Assert.Equal(result.GetLength(0), array.GetLength(0)); 3179Assert.Equal(result.GetLength(1), array.GetLength(1)); 3203Assert.Equal(result.Length, array.GetLength(0)); 3228Assert.Equal(result.Length, array.GetLength(0)); 3253Assert.Equal(result.GetLength(0), array.GetLength(0)); 3254Assert.Equal(result.GetLength(1), array.GetLength(1)); 3280Assert.Equal(result.GetLength(0), array.GetLength(0)); 3281Assert.Equal(result.GetLength(1), array.GetLength(1)); 3305Assert.Equal(result.Length, array.GetLength(0)); 3330Assert.Equal(result.Length, array.GetLength(0)); 3368Assert.Equal(result.GetLength(0), array.GetLength(0)); 3369Assert.Equal(result.GetLength(1), array.GetLength(1)); 3395Assert.Equal(result.GetLength(0), array.GetLength(0)); 3396Assert.Equal(result.GetLength(1), array.GetLength(1)); 3419Assert.Equal(result.Length, array.GetLength(0)); 3444Assert.Equal(result.Length, array.GetLength(0)); 3482Assert.Equal(result.GetLength(0), array.GetLength(0)); 3483Assert.Equal(result.GetLength(1), array.GetLength(1)); 3509Assert.Equal(result.GetLength(0), array.GetLength(0)); 3510Assert.Equal(result.GetLength(1), array.GetLength(1)); 3534Assert.Equal(result.Length, array.GetLength(0)); 3559Assert.Equal(result.Length, array.GetLength(0)); 3597Assert.Equal(result.GetLength(0), array.GetLength(0)); 3598Assert.Equal(result.GetLength(1), array.GetLength(1)); 3624Assert.Equal(result.GetLength(0), array.GetLength(0)); 3625Assert.Equal(result.GetLength(1), array.GetLength(1)); 3649Assert.Equal(result.Length, array.GetLength(0)); 3674Assert.Equal(result.Length, array.GetLength(0)); 3712Assert.Equal(result.GetLength(0), array.GetLength(0)); 3713Assert.Equal(result.GetLength(1), array.GetLength(1)); 3739Assert.Equal(result.GetLength(0), array.GetLength(0)); 3740Assert.Equal(result.GetLength(1), array.GetLength(1)); 3764Assert.Equal(result.Length, array.GetLength(0)); 3789Assert.Equal(result.Length, array.GetLength(0)); 3827Assert.Equal(result.GetLength(0), array.GetLength(0)); 3828Assert.Equal(result.GetLength(1), array.GetLength(1)); 3854Assert.Equal(result.GetLength(0), array.GetLength(0)); 3855Assert.Equal(result.GetLength(1), array.GetLength(1)); 3886Assert.Equal(expected.Length, array.GetLength(0)); 3912Assert.Equal(expected.Length, array.GetLength(0)); 3956Assert.Equal(expected.GetLength(0), array.GetLength(0)); 3957Assert.Equal(expected.GetLength(1), array.GetLength(1)); 3983Assert.Equal(expected.GetLength(0), array.GetLength(0)); 3984Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4019Assert.Equal(expected.Length, array.GetLength(0)); 4045Assert.Equal(expected.Length, array.GetLength(0)); 4095Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4096Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4123Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4124Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4148Assert.Equal(expected.Length, array.GetLength(0)); 4173Assert.Equal(expected.Length, array.GetLength(0)); 4216Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4217Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4243Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4244Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4268Assert.Equal(expected.Length, array.GetLength(0)); 4293Assert.Equal(expected.Length, array.GetLength(0)); 4343Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4344Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4370Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4371Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4398Assert.Equal(result.Length, array.GetLength(0)); 4425Assert.Equal(result.Length, array.GetLength(0)); 4461Assert.Equal(result.GetLength(0), array.GetLength(0)); 4462Assert.Equal(result.GetLength(1), array.GetLength(1)); 4498Assert.Equal(result.GetLength(0), array.GetLength(0)); 4499Assert.Equal(result.GetLength(1), array.GetLength(1)); 4530Assert.Equal(result.Length, array.GetLength(0)); 4567Assert.Equal(result.Length, array.GetLength(0)); 4615Assert.Equal(result.GetLength(0), array.GetLength(0)); 4616Assert.Equal(result.GetLength(1), array.GetLength(1)); 4672Assert.Equal(result.GetLength(0), array.GetLength(0)); 4673Assert.Equal(result.GetLength(1), array.GetLength(1)); 4712Assert.Equal(result.Length, array.GetLength(0)); 4749Assert.Equal(result.Length, array.GetLength(0)); 4797Assert.Equal(result.GetLength(0), array.GetLength(0)); 4798Assert.Equal(result.GetLength(1), array.GetLength(1)); 4854Assert.Equal(result.GetLength(0), array.GetLength(0)); 4855Assert.Equal(result.GetLength(1), array.GetLength(1)); 4895Assert.Equal(result.Length, array.GetLength(0)); 4933Assert.Equal(result.Length, array.GetLength(0)); 4982Assert.Equal(result.GetLength(0), array.GetLength(0)); 4983Assert.Equal(result.GetLength(1), array.GetLength(1)); 5040Assert.Equal(result.GetLength(0), array.GetLength(0)); 5041Assert.Equal(result.GetLength(1), array.GetLength(1)); 5101Assert.Equal(result.Length, array.GetLength(0)); 5153Assert.Equal(result.Length, array.GetLength(0)); 5237Assert.Equal(result.GetLength(0), array.GetLength(0)); 5238Assert.Equal(result.GetLength(1), array.GetLength(1)); 5452cElements = (uint)multiDimArray.GetLength(0), 5458cElements = (uint)multiDimArray.GetLength(1), 5470for (int i = 0; i < multiDimArray.GetLength(0); i++) 5472for (int j = 0; j < multiDimArray.GetLength(1); j++)
UIAutomationClient (4)
MS\Internal\Automation\CacheHelper.cs (1)
109if (response.RequestedData != null && propIndex != response.RequestedData.GetLength(0))
MS\Internal\Automation\UiaCoreApi.cs (3)
210for(int objIndex = 0 ; objIndex < data.GetLength(0) ; objIndex++ ) 465int properties = requestedData.GetLength(1); 469int endRow = i < treeStructures.Length - 1 ? offsets[i + 1] : requestedData.GetLength(0);