-
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 2 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: | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
```cs | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
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" />.</param> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<summary>Construct an Index using a value and indicating if the index is from the start or from the end.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<remarks> | ||||||||||
<format type="text/markdown"> | ||||||||||
<![CDATA[ | ||||||||||
|
||||||||||
### Remarks | ||||||||||
|
||||||||||
If the Index constructed from the end, index value 1 means pointing at the last element and index value 0 means pointing at beyond last element. | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
]]> | ||||||||||
</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>Create an Index pointing at beyond last element.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<value>The Index pointing at beyond last element.</value> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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">An Index object to compare with this Index object.</param> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<summary>Indicates whether the current Index object is equal to another Index object.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<returns><see langword="true" /> if the current Index object is equal to the passed Index object, <see langword="false" /> otherwise.</returns> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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 Index object.</param> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<summary>Indicates whether the current Index object is equal to the passed object.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<returns><see langword="true" /> if the current Index object is equal to the passed object, <see langword="false" /> otherwise.</returns> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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.</param> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<summary>Create an Index from the end at the position indicated by the value.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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 value from the start.</param> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<summary>Create an Index from the start at the position indicated by the value.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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,24 @@ | |||||||||
<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> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<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 +314,8 @@ | |||||||||
<ReturnType>System.Boolean</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Indicates whether the index is from the start or the end.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<value><see langword="true" /> if the Index is from the end, <see. langword="false" /> if it's not.</value> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -305,9 +342,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 +368,8 @@ | |||||||||
<ReturnType>System.Index</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Creates an Index pointing at the first element.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<value>An Index of the first element.</value> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -357,8 +394,8 @@ | |||||||||
</ReturnValue> | ||||||||||
<Parameters /> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<returns>To be added.</returns> | ||||||||||
<summary>Converts the value of the current Index object to its equivalent string representation.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<returns>The string representation of the Index.</returns> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
@@ -382,8 +419,8 @@ | |||||||||
<ReturnType>System.Int32</ReturnType> | ||||||||||
</ReturnValue> | ||||||||||
<Docs> | ||||||||||
<summary>To be added.</summary> | ||||||||||
<value>To be added.</value> | ||||||||||
<summary>Returns the index value.</summary> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<value>The integer value of the Index.</value> | ||||||||||
carlossanlop marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
<remarks>To be added.</remarks> | ||||||||||
</Docs> | ||||||||||
</Member> | ||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.