Skip to content

Commit 62aa16c

Browse files
carlossanlopThraka
authored andcommitted
Document TryParse Span method overloads for System.B-G (#3433)
* Document TryParse Span methods overloads for Boolean, Byte, DateTime, DateTimeoffset, Decimal, Double, Enum, Guid * rewordings
1 parent 0c89567 commit 62aa16c

File tree

8 files changed

+81
-91
lines changed

8 files changed

+81
-91
lines changed

xml/System/Boolean.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1821,10 +1821,10 @@
18211821
<Parameter Name="result" Type="System.Boolean" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
18221822
</Parameters>
18231823
<Docs>
1824-
<param name="value">To be added.</param>
1825-
<param name="result">To be added.</param>
1826-
<summary>To be added.</summary>
1827-
<returns>To be added.</returns>
1824+
<param name="value">A span containing the characters representing the value to convert.</param>
1825+
<param name="result">When this method returns, if the conversion succeeded, contains <see langword="true" /> if <paramref name="value" /> is equal to <see cref="F:System.Boolean.TrueString" /> or <see langword="false" /> if <paramref name="value" /> is equal to <see cref="F:System.Boolean.FalseString" />. If the conversion failed, contains <see langword="false" />. The conversion fails if <paramref name="value" /> is <see langword="null" /> or is not equal to the value of either the <see cref="F:System.Boolean.TrueString" /> or <see cref="F:System.Boolean.FalseString" /> field.</param>
1826+
<summary>Tries to convert the specified span representation of a logical value to its <see cref="T:System.Boolean" /> equivalent.</summary>
1827+
<returns><see langword="true" /> if <paramref name="value" /> was converted successfully; otherwise, <see langword="false" />.</returns>
18281828
<remarks>To be added.</remarks>
18291829
</Docs>
18301830
</Member>
@@ -1866,9 +1866,8 @@
18661866
<Docs>
18671867
<param name="value">A string containing the value to convert.</param>
18681868
<param name="result">When this method returns, if the conversion succeeded, contains <see langword="true" /> if <paramref name="value" /> is equal to <see cref="F:System.Boolean.TrueString" /> or <see langword="false" /> if <paramref name="value" /> is equal to <see cref="F:System.Boolean.FalseString" />. If the conversion failed, contains <see langword="false" />. The conversion fails if <paramref name="value" /> is <see langword="null" /> or is not equal to the value of either the <see cref="F:System.Boolean.TrueString" /> or <see cref="F:System.Boolean.FalseString" /> field.</param>
1869-
<summary>Tries to convert the specified string representation of a logical value to its <see cref="T:System.Boolean" /> equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
1870-
<returns>
1871-
<see langword="true" /> if <paramref name="value" /> was converted successfully; otherwise, <see langword="false" />.</returns>
1869+
<summary>Tries to convert the specified string representation of a logical value to its <see cref="T:System.Boolean" /> equivalent.</summary>
1870+
<returns><see langword="true" /> if <paramref name="value" /> was converted successfully; otherwise, <see langword="false" />.</returns>
18721871
<remarks>
18731872
<format type="text/markdown"><![CDATA[
18741873

xml/System/Byte.xml

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2351,10 +2351,10 @@
23512351
<Parameter Name="result" Type="System.Byte" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
23522352
</Parameters>
23532353
<Docs>
2354-
<param name="s">To be added.</param>
2355-
<param name="result">To be added.</param>
2356-
<summary>To be added.</summary>
2357-
<returns>To be added.</returns>
2354+
<param name="s">A span containing the characters representing the number to convert.</param>
2355+
<param name="result">When this method returns, contains the <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized; any value originally supplied in <paramref name="result" /> will be overwritten.</param>
2356+
<summary>Tries to convert the span representation of a number to its <see cref="T:System.Byte" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
2357+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
23582358
<remarks>To be added.</remarks>
23592359
</Docs>
23602360
</Member>
@@ -2394,11 +2394,10 @@
23942394
<Parameter Name="result" Type="System.Byte" RefType="out" Index="1" FrameworkAlternate="dotnet-uwp-10.0;netcore-1.0;netcore-1.1;netcore-2.0;netcore-2.1;netcore-2.2;netcore-3.0;netframework-2.0;netframework-3.0;netframework-3.5;netframework-4.0;netframework-4.5;netframework-4.5.1;netframework-4.5.2;netframework-4.6;netframework-4.6.1;netframework-4.6.2;netframework-4.7;netframework-4.7.1;netframework-4.7.2;netframework-4.8;netstandard-1.0;netstandard-1.1;netstandard-1.2;netstandard-1.3;netstandard-1.4;netstandard-1.5;netstandard-1.6;netstandard-2.0;netstandard-2.1;xamarinandroid-7.1;xamarinios-10.8;xamarinmac-3.0" />
23952395
</Parameters>
23962396
<Docs>
2397-
<param name="s">A string that contains a number to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
2397+
<param name="s">A string that contains a number to convert.</param>
23982398
<param name="result">When this method returns, contains the <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized; any value originally supplied in <paramref name="result" /> will be overwritten.</param>
23992399
<summary>Tries to convert the string representation of a number to its <see cref="T:System.Byte" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
2400-
<returns>
2401-
<see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
2400+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
24022401
<remarks>
24032402
<format type="text/markdown"><![CDATA[
24042403
@@ -2471,12 +2470,12 @@
24712470
<Parameter Name="result" Type="System.Byte" RefType="out" Index="3" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
24722471
</Parameters>
24732472
<Docs>
2474-
<param name="s">To be added.</param>
2475-
<param name="style">To be added.</param>
2476-
<param name="provider">To be added.</param>
2477-
<param name="result">To be added.</param>
2478-
<summary>To be added.</summary>
2479-
<returns>To be added.</returns>
2473+
<param name="s">A span containing the characters representing the number to convert. The span is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
2474+
<param name="style">A bitwise combination of enumeration values that indicates the style elements that can be present in <paramref name="s" />. A typical value to specify is <see cref="F:System.Globalization.NumberStyles.Integer" />.</param>
2475+
<param name="provider">An object that supplies culture-specific formatting information about <paramref name="s" />. If <paramref name="provider" /> is <see langword="null" />, the thread current culture is used.</param>
2476+
<param name="result">When this method returns, contains the 8-bit unsigned integer value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" /> or <see cref="F:System.String.Empty" />, is not of the correct format, or represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. This parameter is passed uninitialized; any value originally supplied in <paramref name="result" /> will be overwritten.</param>
2477+
<summary>Converts the span representation of a number in a specified style and culture-specific format to its <see cref="T:System.Byte" /> equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
2478+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
24802479
<remarks>To be added.</remarks>
24812480
</Docs>
24822481
</Member>
@@ -2523,8 +2522,7 @@
25232522
<param name="provider">An object that supplies culture-specific formatting information about <paramref name="s" />. If <paramref name="provider" /> is <see langword="null" />, the thread current culture is used.</param>
25242523
<param name="result">When this method returns, contains the 8-bit unsigned integer value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" /> or <see cref="F:System.String.Empty" />, is not of the correct format, or represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. This parameter is passed uninitialized; any value originally supplied in <paramref name="result" /> will be overwritten.</param>
25252524
<summary>Converts the string representation of a number in a specified style and culture-specific format to its <see cref="T:System.Byte" /> equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
2526-
<returns>
2527-
<see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
2525+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
25282526
<remarks>
25292527
<format type="text/markdown"><![CDATA[
25302528

xml/System/DateTime.xml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8100,10 +8100,10 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
81008100
<Parameter Name="result" Type="System.DateTime" RefType="out" Index="1" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
81018101
</Parameters>
81028102
<Docs>
8103-
<param name="s">To be added.</param>
8104-
<param name="result">To be added.</param>
8103+
<param name="s">A string containing a date and time to convert.</param>
8104+
<param name="result">When this method returns, contains the <see cref="T:System.DateTime" /> value equivalent to the date and time contained in <paramref name="s" />, if the conversion succeeded, or <see cref="F:System.DateTime.MinValue" /> if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" />, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.</param>
81058105
<summary>To be added.</summary>
8106-
<returns>To be added.</returns>
8106+
<returns><see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
81078107
<remarks>To be added.</remarks>
81088108
</Docs>
81098109
</Member>
@@ -8151,8 +8151,7 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
81518151
<param name="s">A string containing a date and time to convert.</param>
81528152
<param name="result">When this method returns, contains the <see cref="T:System.DateTime" /> value equivalent to the date and time contained in <paramref name="s" />, if the conversion succeeded, or <see cref="F:System.DateTime.MinValue" /> if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" />, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.</param>
81538153
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTime" /> equivalent and returns a value that indicates whether the conversion succeeded.</summary>
8154-
<returns>
8155-
<see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
8154+
<returns><see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
81568155
<remarks>
81578156
<format type="text/markdown"><![CDATA[
81588157

@@ -8222,12 +8221,12 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
82228221
<Parameter Name="result" Type="System.DateTime" RefType="out" Index="3" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
82238222
</Parameters>
82248223
<Docs>
8225-
<param name="s">To be added.</param>
8226-
<param name="provider">To be added.</param>
8227-
<param name="styles">To be added.</param>
8228-
<param name="result">To be added.</param>
8229-
<summary>To be added.</summary>
8230-
<returns>To be added.</returns>
8224+
<param name="s">A span containing the characters representing the date and time to convert.</param>
8225+
<param name="provider">An object that supplies culture-specific formatting information about <paramref name="s" />.</param>
8226+
<param name="styles">A bitwise combination of enumeration values that defines how to interpret the parsed date in relation to the current time zone or the current date. A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" />.</param>
8227+
<param name="result">When this method returns, contains the <see cref="T:System.DateTime" /> value equivalent to the date and time contained in <paramref name="s" />, if the conversion succeeded, or <see cref="F:System.DateTime.MinValue" /> if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" />, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.</param>
8228+
<summary>Converts the span representation of a date and time to its <see cref="T:System.DateTime" /> equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded.</summary>
8229+
<returns><see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
82318230
<remarks>To be added.</remarks>
82328231
</Docs>
82338232
</Member>
@@ -8279,8 +8278,7 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
82798278
<param name="styles">A bitwise combination of enumeration values that defines how to interpret the parsed date in relation to the current time zone or the current date. A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" />.</param>
82808279
<param name="result">When this method returns, contains the <see cref="T:System.DateTime" /> value equivalent to the date and time contained in <paramref name="s" />, if the conversion succeeded, or <see cref="F:System.DateTime.MinValue" /> if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" />, is an empty string (""), or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.</param>
82818280
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTime" /> equivalent using the specified culture-specific format information and formatting style, and returns a value that indicates whether the conversion succeeded.</summary>
8282-
<returns>
8283-
<see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
8281+
<returns><see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
82848282
<remarks>
82858283
<format type="text/markdown"><![CDATA[
82868284

0 commit comments

Comments
 (0)