Skip to content

Commit 517c34c

Browse files
carlossanlopBillWagner
authored andcommitted
Document TryParseExact Span method overloads in System date and time types (#3435)
* Document TryParseExact Span method overloads in System types * fix wrong singular params, a->an * Fix additional a -> an
1 parent 6f5f668 commit 517c34c

File tree

3 files changed

+54
-61
lines changed

3 files changed

+54
-61
lines changed

xml/System/DateTime.xml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8408,13 +8408,13 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
84088408
<Parameter Name="result" Type="System.DateTime" RefType="out" Index="4" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
84098409
</Parameters>
84108410
<Docs>
8411-
<param name="s">To be added.</param>
8412-
<param name="format">To be added.</param>
8413-
<param name="provider">To be added.</param>
8414-
<param name="style">To be added.</param>
8415-
<param name="result">To be added.</param>
8416-
<summary>To be added.</summary>
8417-
<returns>To be added.</returns>
8411+
<param name="s">A span containing the characters representing a date and time to convert.</param>
8412+
<param name="format">The required format of <paramref name="s" />.</param>
8413+
<param name="provider">An object that supplies culture-specific formatting information about <paramref name="s" />.</param>
8414+
<param name="style">A bitwise combination of one or more enumeration values that indicate the permitted format of <paramref name="s" />.</param>
8415+
<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 either the <paramref name="s" /> or <paramref name="format" /> parameter is <see langword="null" />, is an empty string, or does not contain a date and time that correspond to the pattern specified in <paramref name="format" />. This parameter is passed uninitialized.</param>
8416+
<summary>Converts the specified span representation of a date and time to its <see cref="T:System.DateTime" /> equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly. The method returns a value that indicates whether the conversion succeeded.</summary>
8417+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
84188418
<remarks>To be added.</remarks>
84198419
</Docs>
84208420
</Member>
@@ -8503,8 +8503,7 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
85038503
<param name="style">A bitwise combination of one or more enumeration values that indicate the permitted format of <paramref name="s" />.</param>
85048504
<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 either the <paramref name="s" /> or <paramref name="format" /> parameter is <see langword="null" />, is an empty string, or does not contain a date and time that correspond to the pattern specified in <paramref name="format" />. This parameter is passed uninitialized.</param>
85058505
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTime" /> equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly. The method returns a value that indicates whether the conversion succeeded.</summary>
8506-
<returns>
8507-
<see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
8506+
<returns><see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
85088507
<remarks>
85098508
<format type="text/markdown"><![CDATA[
85108509

@@ -8619,8 +8618,7 @@ The value of the current <xref:System.DateTime> object is formatted using the pa
86198618
<param name="style">A bitwise combination of enumeration values that indicates the permitted format of <paramref name="s" />. A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" />.</param>
86208619
<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 <paramref name="s" /> or <paramref name="formats" /> is <see langword="null" />, <paramref name="s" /> or an element of <paramref name="formats" /> is an empty string, or the format of <paramref name="s" /> is not exactly as specified by at least one of the format patterns in <paramref name="formats" />. This parameter is passed uninitialized.</param>
86218620
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTime" /> equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match at least one of the specified formats exactly. The method returns a value that indicates whether the conversion succeeded.</summary>
8622-
<returns>
8623-
<see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
8621+
<returns><see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
86248622
<remarks>
86258623
<format type="text/markdown"><![CDATA[
86268624

xml/System/DateTimeOffset.xml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5690,14 +5690,13 @@ Me.ToUtcDateTime().ToFileTime()
56905690
<Parameter Name="result" Type="System.DateTimeOffset" RefType="out" Index="4" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
56915691
</Parameters>
56925692
<Docs>
5693-
<param name="input">A character span that contains the representation of a date and time to convert.</param>
5693+
<param name="input">A span containing the characters that represent a date and time to convert.</param>
56945694
<param name="format">A format specifier that defines the required format of <paramref name="input" />.</param>
56955695
<param name="formatProvider">An object that supplies culture-specific formatting information about <paramref name="input" />.</param>
56965696
<param name="styles">A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" />. A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" /></param>
56975697
<param name="result">When the method returns, contains the <see cref="T:System.DateTimeOffset" /> equivalent to the date and time of <paramref name="input" />, if the conversion succeeded, or <see cref="F:System.DateTimeOffset.MinValue" /> if the conversion failed. The conversion fails if the </param>
56985698
<summary>Converts the representation of a date and time in a character span to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified format, culture-specific format information, and style. The format of the date and time representation must match the specified format exactly.</summary>
5699-
<returns>
5700-
<see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
5699+
<returns><see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
57015700
<remarks>
57025701
<format type="text/markdown"><![CDATA[
57035702
@@ -5771,13 +5770,13 @@ The particular date and time symbols and strings used in `input` are defined by
57715770
<Parameter Name="result" Type="System.DateTimeOffset" RefType="out" Index="4" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
57725771
</Parameters>
57735772
<Docs>
5774-
<param name="input">To be added.</param>
5775-
<param name="formats">To be added.</param>
5776-
<param name="formatProvider">To be added.</param>
5777-
<param name="styles">To be added.</param>
5778-
<param name="result">To be added.</param>
5779-
<summary>To be added.</summary>
5780-
<returns>To be added.</returns>
5773+
<param name="input">A span containing the characters that represent a date and time to convert.</param>
5774+
<param name="formats">A array of standard or custom format strings that define the acceptable formats of <paramref name="input" />.</param>
5775+
<param name="formatProvider">An object that supplies culture-specific formatting information about <paramref name="input" />.</param>
5776+
<param name="styles">A bitwise combination of enumeration values that indicates the permitted format of <paramref name="input" />. A typical value to specify is <see cref="F:System.Globalization.DateTimeStyles.None" /></param>
5777+
<param name="result">When the method returns, contains the <see cref="T:System.DateTimeOffset" /> equivalent to the date and time of <paramref name="input" />, if the conversion succeeded, or <see cref="F:System.DateTimeOffset.MinValue" /> if the conversion failed. The conversion fails if the </param>
5778+
<summary>Converts the representation of a date and time in a character span to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified formats, culture-specific format information, and style. The format of the date and time representation must match one of the specified formats exactly.</summary>
5779+
<returns><see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
57815780
<remarks>
57825781
<format type="text/markdown"><![CDATA[
57835782
@@ -5869,8 +5868,7 @@ This method parses the string representation of a date that matches any one of t
58695868
<param name="styles">A bitwise combination of enumeration values that indicates the permitted format of input. A typical value to specify is <see langword="None" />.</param>
58705869
<param name="result">When the method returns, contains the <see cref="T:System.DateTimeOffset" /> equivalent to the date and time of <paramref name="input" />, if the conversion succeeded, or <see cref="F:System.DateTimeOffset.MinValue" />, if the conversion failed. The conversion fails if the <paramref name="input" /> parameter is <see langword="null" />, or does not contain a valid string representation of a date and time in the expected format defined by <paramref name="format" /> and <c>provider</c>. This parameter is passed uninitialized.</param>
58715870
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified format, culture-specific format information, and style. The format of the string representation must match the specified format exactly.</summary>
5872-
<returns>
5873-
<see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
5871+
<returns><see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
58745872
<remarks>
58755873
<format type="text/markdown"><![CDATA[
58765874
@@ -5984,8 +5982,7 @@ Strings that do not specify a UTC offset are assumed to have the offset of the l
59845982
<param name="styles">A bitwise combination of enumeration values that indicates the permitted format of input. A typical value to specify is <see langword="None" />.</param>
59855983
<param name="result">When the method returns, contains the <see cref="T:System.DateTimeOffset" /> equivalent to the date and time of <paramref name="input" />, if the conversion succeeded, or <see cref="F:System.DateTimeOffset.MinValue" />, if the conversion failed. The conversion fails if the <paramref name="input" /> does not contain a valid string representation of a date and time, or does not contain the date and time in the expected format defined by <paramref name="format" />, or if <paramref name="formats" /> is <see langword="null" />. This parameter is passed uninitialized.</param>
59865984
<summary>Converts the specified string representation of a date and time to its <see cref="T:System.DateTimeOffset" /> equivalent using the specified array of formats, culture-specific format information, and style. The format of the string representation must match one of the specified formats exactly.</summary>
5987-
<returns>
5988-
<see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
5985+
<returns><see langword="true" /> if the <paramref name="input" /> parameter is successfully converted; otherwise, <see langword="false" />.</returns>
59895986
<remarks>
59905987
<format type="text/markdown"><![CDATA[
59915988

0 commit comments

Comments
 (0)