Skip to content

Commit 0ea9698

Browse files
committed
Add missing ArgumentException and FormatException documentation to DateTime.TryParseExact
1 parent 7eb2f59 commit 0ea9698

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

xml/System/DateTime.xml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9934,6 +9934,17 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
99349934
<returns>
99359935
<see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
99369936
<remarks>To be added.</remarks>
9937+
<exception cref="T:System.FormatException">The length of <paramref name="format" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.
9938+
9939+
-or-
9940+
9941+
<paramref name="format" /> does not contain a valid custom format pattern.</exception>
9942+
<exception cref="T:System.ArgumentException">
9943+
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
9944+
9945+
-or-
9946+
9947+
<paramref name="style" /> contains an invalid combination of <see cref="T:System.Globalization.DateTimeStyles" /> values (for example, both <see cref="F:System.Globalization.DateTimeStyles.AssumeLocal" /> and <see cref="F:System.Globalization.DateTimeStyles.AssumeUniversal" />).</exception>
99379948
</Docs>
99389949
</Member>
99399950
<Member MemberName="TryParseExact">
@@ -9999,8 +10010,19 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
999910010
<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">DateTime.MinValue</see> if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is <see langword="null" />, is <see cref="F:System.String.Empty" />, or does not contain a valid string representation of a date and time. This parameter is passed uninitialized.</param>
1000010011
<summary>Converts the specified char span of a date and time to its <see cref="T:System.DateTime" /> equivalent and returns a value that indicates whether the conversion succeeded.</summary>
1000110012
<returns>
10002-
<see langword="true" /> if the <paramref name="s" /> parameter was converted successfully; otherwise, <see langword="false" />.</returns>
10013+
<see langword="true" /> if <paramref name="s" /> was converted successfully; otherwise, <see langword="false" />.</returns>
1000310014
<remarks>To be added.</remarks>
10015+
<exception cref="T:System.FormatException">The length of <paramref name="format" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.
10016+
10017+
-or-
10018+
10019+
<paramref name="format" /> does not contain a valid custom format pattern.</exception>
10020+
<exception cref="T:System.ArgumentException">
10021+
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
10022+
10023+
-or-
10024+
10025+
<paramref name="style" /> contains an invalid combination of <see cref="T:System.Globalization.DateTimeStyles" /> values (for example, both <see cref="F:System.Globalization.DateTimeStyles.AssumeLocal" /> and <see cref="F:System.Globalization.DateTimeStyles.AssumeUniversal" />).</exception>
1000410026
</Docs>
1000510027
</Member>
1000610028
<Member MemberName="TryParseExact">
@@ -10129,6 +10151,11 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
1012910151

1013010152
]]></format>
1013110153
</remarks>
10154+
<exception cref="T:System.FormatException">The length of <paramref name="format" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.
10155+
10156+
-or-
10157+
10158+
<paramref name="format" /> does not contain a valid custom format pattern.</exception>
1013210159
<exception cref="T:System.ArgumentException">
1013310160
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
1013410161

@@ -10269,6 +10296,11 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
1026910296

1027010297
]]></format>
1027110298
</remarks>
10299+
<exception cref="T:System.FormatException">The length of <paramref name="format" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.
10300+
10301+
-or-
10302+
10303+
<paramref name="format" /> does not contain a valid custom format pattern.</exception>
1027210304
<exception cref="T:System.ArgumentException">
1027310305
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
1027410306

0 commit comments

Comments
 (0)