Skip to content

Commit 3226ef8

Browse files
jkotasRon Petrusha
authored andcommitted
Clarify that gcAllowVeryLargeObjects applies to .NET Framework only (#2221)
1 parent a8b3123 commit 3226ef8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

xml/System/Array.xml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@
7070
An element is a value in an <xref:System.Array>. The length of an <xref:System.Array> is the total number of elements it can contain. The lower bound of an <xref:System.Array> is the index of its first element. An <xref:System.Array> can have any lower bound, but it has a lower bound of zero by default. A different lower bound can be defined when creating an instance of the <xref:System.Array> class using <xref:System.Array.CreateInstance%2A>.A multidimensional <xref:System.Array> can have different bounds for each dimension. An array can have a maximum of 32 dimensions.
7171

7272
Unlike the classes in the <xref:System.Collections> namespaces, <xref:System.Array> has a fixed capacity. To increase the capacity, you must create a new <xref:System.Array> object with the required capacity, copy the elements from the old <xref:System.Array> object to the new one, and delete the old <xref:System.Array>.
73+
74+
The array size is limited to a total of 4 billion elements, and to a maximum index of 0X7FEFFFFF in any given dimension (0X7FFFFFC7 for byte arrays and arrays of single-byte structures).
7375

74-
By default, the maximum size of an <xref:System.Array> is 2 gigabytes (GB). In a 64-bit environment, you can avoid the size restriction by setting the `enabled` attribute of the [gcAllowVeryLargeObjects](~/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md) configuration element to `true` in the run-time environment. However, the array will still be limited to a total of 4 billion elements, and to a maximum index of 0X7FEFFFFF in any given dimension (0X7FFFFFC7 for byte arrays and arrays of single-byte structures).
76+
**.NET Framework only:** By default, the maximum size of an <xref:System.Array> is 2 gigabytes (GB). In a 64-bit environment, you can avoid the size restriction by setting the `enabled` attribute of the [gcAllowVeryLargeObjects](~/docs/framework/configure-apps/file-schema/runtime/gcallowverylargeobjects-element.md) configuration element to `true` in the run-time environment.
7577

7678
Single-dimensional arrays implement the <xref:System.Collections.Generic.IList%601?displayProperty=nameWithType>, <xref:System.Collections.Generic.ICollection%601?displayProperty=nameWithType>, <xref:System.Collections.Generic.IEnumerable%601?displayProperty=nameWithType>, <xref:System.Collections.Generic.IReadOnlyList%601?displayProperty=nameWithType> and <xref:System.Collections.Generic.IReadOnlyCollection%601?displayProperty=nameWithType> generic interfaces. The implementations are provided to arrays at run time, and as a result, the generic interfaces do not appear in the declaration syntax for the <xref:System.Array> class. In addition, there are no reference topics for interface members that are accessible only by casting an array to the generic interface type (explicit interface implementations). The key thing to be aware of when you cast an array to one of these interfaces is that members which add, insert, or remove elements throw <xref:System.NotSupportedException>.
7779

@@ -9936,4 +9938,4 @@ int[,,] TDArray = new int[1,1,1];
99369938
</Docs>
99379939
</Member>
99389940
</Members>
9939-
</Type>
9941+
</Type>

0 commit comments

Comments
 (0)