Skip to content

Commit a150563

Browse files
authored
Merge pull request #11513 from casuffitsharp/10886
Add missing exception documentation for DateTime.TryParseExact
2 parents 7eb2f59 + d72e720 commit a150563

File tree

1 file changed

+25
-1
lines changed

1 file changed

+25
-1
lines changed

xml/System/DateTime.xml

Lines changed: 25 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,15 @@ 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 an element in <paramref name="formats" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.</exception>
10016+
<exception cref="T:System.ArgumentException">
10017+
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
10018+
10019+
-or-
10020+
10021+
<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>
1000410022
</Docs>
1000510023
</Member>
1000610024
<Member MemberName="TryParseExact">
@@ -10129,6 +10147,11 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
1012910147

1013010148
]]></format>
1013110149
</remarks>
10150+
<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" />.
10151+
10152+
-or-
10153+
10154+
<paramref name="format" /> does not contain a valid custom format pattern.</exception>
1013210155
<exception cref="T:System.ArgumentException">
1013310156
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
1013410157

@@ -10269,6 +10292,7 @@ The following example illustrates the <xref:System.DateTime.TryParse%28System.St
1026910292

1027010293
]]></format>
1027110294
</remarks>
10295+
<exception cref="T:System.FormatException">The length of an element in <paramref name="formats" /> is 1, and it is not one of the format specifier characters defined for <see cref="T:System.Globalization.DateTimeFormatInfo" />.</exception>
1027210296
<exception cref="T:System.ArgumentException">
1027310297
<paramref name="style" /> is not a valid <see cref="T:System.Globalization.DateTimeStyles" /> value.
1027410298

0 commit comments

Comments
 (0)