-
Notifications
You must be signed in to change notification settings - Fork 1.6k
coreclr: Automatic port of triple slash from System #2729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 18 commits
aedd552
1c78edf
3b193fc
cc0ec5f
c994b64
6aefa09
731c14c
ce54d35
0105f1a
95ccebe
816e6f0
ac2c27f
c8e643b
b8caade
2da3c3f
cd3d718
50f2db2
30dee39
8c4741d
652987f
acbc62c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -27,8 +27,21 @@ | |||||||||
</Attribute> | ||||||||||
</Attributes> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
<summary>Represent a type can be used to index a collection either from the start or the end.</summary> | ||||||||||
<remarks> | ||||||||||
<format type="text/markdown"><![CDATA[ | ||||||||||
|
||||||||||
### Remarks | ||||||||||
|
||||||||||
`Index` is used by the C# compiler to support the new index syntax: | ||||||||||
|
||||||||||
```csharp | ||||||||||
int[] someArray = new int[5] { 1, 2, 3, 4, 5 }; | ||||||||||
int lastElement = someArray[^1]; // lastElement = 5 | ||||||||||
``` | ||||||||||
|
||||||||||
]]></format> | ||||||||||
</remarks> | ||||||||||
</Docs> | ||||||||||
<Members> | ||||||||||
<Member MemberName=".ctor"> | ||||||||||
|
@@ -52,10 +65,20 @@ | |||||||||
<Parameter Name="fromEnd" Type="System.Boolean" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="value">To be added.</param> | ||||||||||
<param name="fromEnd">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
<param name="value">The index value. It has to be greater or equal than zero.</param> | ||||||||||
<param name="fromEnd">A boolean indicating if the index is from the start (<see langword="false" />) or from the end (<see langword="true" />) of a collection.</param> | ||||||||||
<summary>Initializes a new <see cref="T:System.Index" /> with a specified index position and a value that indicates if the index is from the start or the end of a collection.</summary> | ||||||||||
<remarks> | ||||||||||
<format type="text/markdown"> | ||||||||||
<![CDATA[ | ||||||||||
|
||||||||||
### Remarks | ||||||||||
|
||||||||||
If the <see cref="T:System.Index" /> is constructed from the end, an index value of 1 points to the last element, and an index value of 0 points beyond last element. | ||||||||||
|
||||||||||
]]> | ||||||||||
</format> | ||||||||||
</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
<Member MemberName="End"> | ||||||||||
|
@@ -78,8 +101,8 @@ | |||||||||
<ReturnType>System.Index</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Gets an <see cref="T:System.Index" /> that points beyond the last element.</summary> | ||||||||||
<value>an <see cref="T:System.Index" /> that points beyond the last element.</value> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -109,9 +132,9 @@ | |||||||||
<Parameter Name="other" Type="System.Index" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="other">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<param name="other">The object to compare with this instance.</param> | ||||||||||
<summary>Returns a value that indicates whether the current object is equal to another <see cref="T:System.Index" /> object.</summary> | ||||||||||
<returns><see langword="true" /> if the current Index object is equal to <paramref name="other" />; <see langword="false" /> otherwise.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -138,9 +161,9 @@ | |||||||||
<Parameter Name="value" Type="System.Object" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="value">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<param name="value">An object to compare with this instance.</param> | ||||||||||
<summary>Indicates whether the current Index object is equal to a specified object.</summary> | ||||||||||
<returns><see langword="true" /> if <paramref name="value" /> is of type <see cref="T:System.Index" /> and is equal to the current instance; <see langword="false" /> otherwise.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -167,9 +190,9 @@ | |||||||||
<Parameter Name="value" Type="System.Int32" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="value">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<param name="value">The index value from the end of a collection.</param> | ||||||||||
<summary>Creates an <see cref="T:System.Index" /> from the end of a collection at a specified index position.</summary> | ||||||||||
<returns>The Index value.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -196,9 +219,9 @@ | |||||||||
<Parameter Name="value" Type="System.Int32" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="value">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<param name="value">The index position from the start of a collection.</param> | ||||||||||
<summary>Create an <see cref="T:System.Index" /> from the specified index at the start of a collection.</summary> | ||||||||||
<returns>The index value.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -223,8 +246,8 @@ | |||||||||
</ReturnValue> | ||||||||||
<Parameters /> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<summary>Returns the hash code for this instance.</summary> | ||||||||||
<returns>The hash code.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -251,10 +274,23 @@ | |||||||||
<Parameter Name="length" Type="System.Int32" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="length">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
<param name="length">The length of the collection that the Index will be used with. Must be a positive value.</param> | ||||||||||
<summary>Calculate the offset from the start using the giving collection length.</summary> | ||||||||||
<returns>The offset.</returns> | ||||||||||
<remarks> | ||||||||||
<format type="text/markdown"> | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This remark was a bit difficult to understand, especially the 3rd sentence, so I left it untouched. Can I get some help to properly rewrite it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I gave it a try. Hopefully it looks a bit better. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I still don't think it's clear. There's nothing that ties
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Help us, @tarekgh, you're our only hope. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What I understood from Tarek's explanation is that length is only considered when retrieving the offset from the end. You are correct, the method ignores the length if it's from the start. |
||||||||||
< There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok I understand now, thanks for the explanation. I'll reword it a bit:
Suggested change
|
||||||||||
|
||||||||||
]]> | ||||||||||
</format> | ||||||||||
</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
<Member MemberName="IsFromEnd"> | ||||||||||
|
@@ -277,8 +313,8 @@ | |||||||||
<ReturnType>System.Boolean</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Gets a value that indicates whether the index is from the start or the end.</summary> | ||||||||||
<value><see langword="true" /> if the Index is from the end; otherwise, <see. langword="false" />.</value> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -305,9 +341,9 @@ | |||||||||
<Parameter Name="value" Type="System.Int32" /> | ||||||||||
</Parameters> | ||||||||||
<Docs> | ||||||||||
<param name="value">To be added.</param> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<param name="value">The integer to convert.</param> | ||||||||||
<summary>Converts integer number to an Index.</summary> | ||||||||||
<returns>An Index representing the integer.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -331,8 +367,8 @@ | |||||||||
<ReturnType>System.Index</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Gets an <see cref="T:System.Index" /> that points to the first element of a collection.</summary> | ||||||||||
<value>An instance that points to the first element of a collection.</value> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -357,8 +393,8 @@ | |||||||||
</ReturnValue> | ||||||||||
<Parameters /> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<summary>Returns the string representation of the current <see cref="T:System.Index" /> instance.</summary> | ||||||||||
<returns>The string representation of the <see cref="T:System.Index" />.</returns> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -382,10 +418,10 @@ | |||||||||
<ReturnType>System.Int32</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Gets the index value.</summary> | ||||||||||
<value>The index value.</value> | ||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
</Members> | ||||||||||
</Type> | ||||||||||
</Type> |
Uh oh!
There was an error while loading. Please reload this page.