333 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.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.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)
191Debug.Assert(byteRanges.GetLength(0) == 1, "We don't support a request with multiple byte ranges"); 218for (int i = 0; i < byteRanges.GetLength(0); ++i) 268for (int i=0, j=0; i < inByteRanges.GetLength(0); ++i, ++j) 457for (int i = 0; i < byteRanges.GetLength(0); ++i) 722if (byteRanges.GetLength(0) <= 0 || byteRanges.GetLength(1) != 2) 727for (int i = 0; i < byteRanges.GetLength(0); ++i)
MS\Internal\IO\Packaging\NetStream.cs (2)
674if (ranges.GetLength(0) > 0) 685while (r < ranges.GetLength(0))
System\Windows\Media\Imaging\PropVariant.cs (1)
259String[] strArray = new String[charArray.GetLength(0)];
System\Windows\Media\Imaging\WriteableBitmap.cs (3)
1071int firstDimLength = sourceBuffer.GetLength(0); 1098int firstDimLength = sourceBuffer.GetLength(0); 1099int 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 (7)
System\Numerics\Tensors\netcore\TensorSpanHelpers.cs (7)
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; 282lengths[i] = array.GetLength(i);
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.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)
2010Assert.Equal(result.Length, array.GetLength(0)); 2029Assert.Equal(result.Length, array.GetLength(0)); 2063Assert.Equal(result.GetLength(0), array.GetLength(0)); 2064Assert.Equal(result.GetLength(1), array.GetLength(1)); 2082Assert.Equal(result.GetLength(0), array.GetLength(0)); 2083Assert.Equal(result.GetLength(1), array.GetLength(1)); 2099Assert.Equal(result.Length, array.GetLength(0)); 2116Assert.Equal(result.Length, array.GetLength(0)); 2154Assert.Equal(result.GetLength(0), array.GetLength(0)); 2155Assert.Equal(result.GetLength(1), array.GetLength(1)); 2181Assert.Equal(result.GetLength(0), array.GetLength(0)); 2182Assert.Equal(result.GetLength(1), array.GetLength(1)); 2206Assert.Equal(result.Length, array.GetLength(0)); 2231Assert.Equal(result.Length, array.GetLength(0)); 2269Assert.Equal(result.GetLength(0), array.GetLength(0)); 2270Assert.Equal(result.GetLength(1), array.GetLength(1)); 2296Assert.Equal(result.GetLength(0), array.GetLength(0)); 2297Assert.Equal(result.GetLength(1), array.GetLength(1)); 2321Assert.Equal(result.Length, array.GetLength(0)); 2346Assert.Equal(result.Length, array.GetLength(0)); 2384Assert.Equal(result.GetLength(0), array.GetLength(0)); 2385Assert.Equal(result.GetLength(1), array.GetLength(1)); 2411Assert.Equal(result.GetLength(0), array.GetLength(0)); 2412Assert.Equal(result.GetLength(1), array.GetLength(1)); 2436Assert.Equal(result.Length, array.GetLength(0)); 2461Assert.Equal(result.Length, array.GetLength(0)); 2499Assert.Equal(result.GetLength(0), array.GetLength(0)); 2500Assert.Equal(result.GetLength(1), array.GetLength(1)); 2526Assert.Equal(result.GetLength(0), array.GetLength(0)); 2527Assert.Equal(result.GetLength(1), array.GetLength(1)); 2551Assert.Equal(result.Length, array.GetLength(0)); 2576Assert.Equal(result.Length, array.GetLength(0)); 2601Assert.Equal(result.GetLength(0), array.GetLength(0)); 2602Assert.Equal(result.GetLength(1), array.GetLength(1)); 2628Assert.Equal(result.GetLength(0), array.GetLength(0)); 2629Assert.Equal(result.GetLength(1), array.GetLength(1)); 2653Assert.Equal(result.Length, array.GetLength(0)); 2678Assert.Equal(result.Length, array.GetLength(0)); 2716Assert.Equal(result.GetLength(0), array.GetLength(0)); 2717Assert.Equal(result.GetLength(1), array.GetLength(1)); 2743Assert.Equal(result.GetLength(0), array.GetLength(0)); 2744Assert.Equal(result.GetLength(1), array.GetLength(1)); 2768Assert.Equal(result.Length, array.GetLength(0)); 2793Assert.Equal(result.Length, array.GetLength(0)); 2818Assert.Equal(result.GetLength(0), array.GetLength(0)); 2819Assert.Equal(result.GetLength(1), array.GetLength(1)); 2845Assert.Equal(result.GetLength(0), array.GetLength(0)); 2846Assert.Equal(result.GetLength(1), array.GetLength(1)); 2870Assert.Equal(result.Length, array.GetLength(0)); 2895Assert.Equal(result.Length, array.GetLength(0)); 2933Assert.Equal(result.GetLength(0), array.GetLength(0)); 2934Assert.Equal(result.GetLength(1), array.GetLength(1)); 2960Assert.Equal(result.GetLength(0), array.GetLength(0)); 2961Assert.Equal(result.GetLength(1), array.GetLength(1)); 2985Assert.Equal(result.Length, array.GetLength(0)); 3010Assert.Equal(result.Length, array.GetLength(0)); 3035Assert.Equal(result.GetLength(0), array.GetLength(0)); 3036Assert.Equal(result.GetLength(1), array.GetLength(1)); 3062Assert.Equal(result.GetLength(0), array.GetLength(0)); 3063Assert.Equal(result.GetLength(1), array.GetLength(1)); 3087Assert.Equal(result.Length, array.GetLength(0)); 3112Assert.Equal(result.Length, array.GetLength(0)); 3150Assert.Equal(result.GetLength(0), array.GetLength(0)); 3151Assert.Equal(result.GetLength(1), array.GetLength(1)); 3177Assert.Equal(result.GetLength(0), array.GetLength(0)); 3178Assert.Equal(result.GetLength(1), array.GetLength(1)); 3202Assert.Equal(result.Length, array.GetLength(0)); 3227Assert.Equal(result.Length, array.GetLength(0)); 3252Assert.Equal(result.GetLength(0), array.GetLength(0)); 3253Assert.Equal(result.GetLength(1), array.GetLength(1)); 3279Assert.Equal(result.GetLength(0), array.GetLength(0)); 3280Assert.Equal(result.GetLength(1), array.GetLength(1)); 3304Assert.Equal(result.Length, array.GetLength(0)); 3329Assert.Equal(result.Length, array.GetLength(0)); 3367Assert.Equal(result.GetLength(0), array.GetLength(0)); 3368Assert.Equal(result.GetLength(1), array.GetLength(1)); 3394Assert.Equal(result.GetLength(0), array.GetLength(0)); 3395Assert.Equal(result.GetLength(1), array.GetLength(1)); 3418Assert.Equal(result.Length, array.GetLength(0)); 3443Assert.Equal(result.Length, array.GetLength(0)); 3481Assert.Equal(result.GetLength(0), array.GetLength(0)); 3482Assert.Equal(result.GetLength(1), array.GetLength(1)); 3508Assert.Equal(result.GetLength(0), array.GetLength(0)); 3509Assert.Equal(result.GetLength(1), array.GetLength(1)); 3533Assert.Equal(result.Length, array.GetLength(0)); 3558Assert.Equal(result.Length, array.GetLength(0)); 3596Assert.Equal(result.GetLength(0), array.GetLength(0)); 3597Assert.Equal(result.GetLength(1), array.GetLength(1)); 3623Assert.Equal(result.GetLength(0), array.GetLength(0)); 3624Assert.Equal(result.GetLength(1), array.GetLength(1)); 3648Assert.Equal(result.Length, array.GetLength(0)); 3673Assert.Equal(result.Length, array.GetLength(0)); 3711Assert.Equal(result.GetLength(0), array.GetLength(0)); 3712Assert.Equal(result.GetLength(1), array.GetLength(1)); 3738Assert.Equal(result.GetLength(0), array.GetLength(0)); 3739Assert.Equal(result.GetLength(1), array.GetLength(1)); 3763Assert.Equal(result.Length, array.GetLength(0)); 3788Assert.Equal(result.Length, array.GetLength(0)); 3826Assert.Equal(result.GetLength(0), array.GetLength(0)); 3827Assert.Equal(result.GetLength(1), array.GetLength(1)); 3853Assert.Equal(result.GetLength(0), array.GetLength(0)); 3854Assert.Equal(result.GetLength(1), array.GetLength(1)); 3885Assert.Equal(expected.Length, array.GetLength(0)); 3911Assert.Equal(expected.Length, array.GetLength(0)); 3955Assert.Equal(expected.GetLength(0), array.GetLength(0)); 3956Assert.Equal(expected.GetLength(1), array.GetLength(1)); 3982Assert.Equal(expected.GetLength(0), array.GetLength(0)); 3983Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4018Assert.Equal(expected.Length, array.GetLength(0)); 4044Assert.Equal(expected.Length, array.GetLength(0)); 4094Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4095Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4122Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4123Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4147Assert.Equal(expected.Length, array.GetLength(0)); 4172Assert.Equal(expected.Length, array.GetLength(0)); 4215Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4216Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4242Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4243Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4267Assert.Equal(expected.Length, array.GetLength(0)); 4292Assert.Equal(expected.Length, array.GetLength(0)); 4342Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4343Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4369Assert.Equal(expected.GetLength(0), array.GetLength(0)); 4370Assert.Equal(expected.GetLength(1), array.GetLength(1)); 4397Assert.Equal(result.Length, array.GetLength(0)); 4424Assert.Equal(result.Length, array.GetLength(0)); 4460Assert.Equal(result.GetLength(0), array.GetLength(0)); 4461Assert.Equal(result.GetLength(1), array.GetLength(1)); 4497Assert.Equal(result.GetLength(0), array.GetLength(0)); 4498Assert.Equal(result.GetLength(1), array.GetLength(1)); 4529Assert.Equal(result.Length, array.GetLength(0)); 4566Assert.Equal(result.Length, array.GetLength(0)); 4614Assert.Equal(result.GetLength(0), array.GetLength(0)); 4615Assert.Equal(result.GetLength(1), array.GetLength(1)); 4671Assert.Equal(result.GetLength(0), array.GetLength(0)); 4672Assert.Equal(result.GetLength(1), array.GetLength(1)); 4711Assert.Equal(result.Length, array.GetLength(0)); 4748Assert.Equal(result.Length, array.GetLength(0)); 4796Assert.Equal(result.GetLength(0), array.GetLength(0)); 4797Assert.Equal(result.GetLength(1), array.GetLength(1)); 4853Assert.Equal(result.GetLength(0), array.GetLength(0)); 4854Assert.Equal(result.GetLength(1), array.GetLength(1)); 4894Assert.Equal(result.Length, array.GetLength(0)); 4932Assert.Equal(result.Length, array.GetLength(0)); 4981Assert.Equal(result.GetLength(0), array.GetLength(0)); 4982Assert.Equal(result.GetLength(1), array.GetLength(1)); 5039Assert.Equal(result.GetLength(0), array.GetLength(0)); 5040Assert.Equal(result.GetLength(1), array.GetLength(1)); 5100Assert.Equal(result.Length, array.GetLength(0)); 5152Assert.Equal(result.Length, array.GetLength(0)); 5236Assert.Equal(result.GetLength(0), array.GetLength(0)); 5237Assert.Equal(result.GetLength(1), array.GetLength(1)); 5449cElements = (uint)multiDimArray.GetLength(0), 5455cElements = (uint)multiDimArray.GetLength(1), 5467for (int i = 0; i < multiDimArray.GetLength(0); i++) 5469for (int j = 0; j < multiDimArray.GetLength(1); j++)
System.Windows.Forms.Tests (4)
System\Windows\Forms\BinaryFormatUtilitiesTests.cs (2)
398result.GetLength(0).Should().Be(2); 399result.GetLength(1).Should().Be(3);
System\Windows\Forms\ClipboardTests.cs (2)
866result.GetLength(0).Should().Be(2); 867result.GetLength(1).Should().Be(3);
UIAutomationClient (4)
MS\Internal\Automation\CacheHelper.cs (1)
104if (response.RequestedData != null && propIndex != response.RequestedData.GetLength(0))
MS\Internal\Automation\UiaCoreApi.cs (3)
209for(int objIndex = 0 ; objIndex < data.GetLength(0) ; objIndex++ ) 464int properties = requestedData.GetLength(1); 468int endRow = i < treeStructures.Length - 1 ? offsets[i + 1] : requestedData.GetLength(0);