Skip to content

Commit 0b91d0d

Browse files
authored
Add InlineArrayAttribute docs (#9600)
1 parent 2d815bf commit 0b91d0d

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

xml/System.Runtime.CompilerServices/InlineArrayAttribute.xml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,16 @@
2525
</Attributes>
2626
<Docs>
2727
<summary>Indicates that the instance's storage is sequentially replicated <see cref="P:System.Runtime.CompilerServices.InlineArrayAttribute.Length" /> times.</summary>
28-
<remarks>To be added.</remarks>
28+
<remarks>This attribute can be used to annotate a <see langword="struct"/> type with a single field. The runtime replicates that field in the actual type layout as many times as is specified.</remarks>
29+
<example>The following example shows how to declare an inline array type with eight <see langword="float"/> values.
30+
<code lang="csharp">
31+
[InlineArray(8)]
32+
struct Float8InlineArray
33+
{
34+
private float _value;
35+
}
36+
</code>
37+
</example>
2938
</Docs>
3039
<Members>
3140
<Member MemberName=".ctor">
@@ -44,8 +53,8 @@
4453
<Parameter Name="length" Type="System.Int32" />
4554
</Parameters>
4655
<Docs>
47-
<param name="length">To be added.</param>
48-
<summary>To be added.</summary>
56+
<param name="length">The number of sequential fields to replicate in the inline array type.</param>
57+
<summary>Creates a new <see cref="T:System.Runtime.CompilerServices.InlineArrayAttribute" /> instance with the specified length.</summary>
4958
<remarks>To be added.</remarks>
5059
</Docs>
5160
</Member>
@@ -65,8 +74,8 @@
6574
<ReturnType>System.Int32</ReturnType>
6675
</ReturnValue>
6776
<Docs>
68-
<summary>To be added.</summary>
69-
<value>To be added.</value>
77+
<summary>Gets the number of sequential fields to replicate in the inline array type.</summary>
78+
<value>The number of sequential fields to replicate in the inline array type.</value>
7079
<remarks>To be added.</remarks>
7180
</Docs>
7281
</Member>

0 commit comments

Comments
 (0)