From 0ea9698d3a4307cd8a831434bf3ff0f727994537 Mon Sep 17 00:00:00 2001 From: Henrique Feliciano de Azevedo Date: Wed, 25 Jun 2025 17:25:45 -0300 Subject: [PATCH 1/2] Add missing ArgumentException and FormatException documentation to DateTime.TryParseExact --- xml/System/DateTime.xml | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/xml/System/DateTime.xml b/xml/System/DateTime.xml index 699302793be..37c888ff29b 100644 --- a/xml/System/DateTime.xml +++ b/xml/System/DateTime.xml @@ -9934,6 +9934,17 @@ The following example illustrates the if was converted successfully; otherwise, . To be added. + The length of is 1, and it is not one of the format specifier characters defined for . + + -or- + + does not contain a valid custom format pattern. + + is not a valid value. + + -or- + + contains an invalid combination of values (for example, both and ). @@ -9999,8 +10010,19 @@ The following example illustrates the When this method returns, contains the value equivalent to the date and time contained in , if the conversion succeeded, or DateTime.MinValue if the conversion failed. The conversion fails if the parameter is , is , or does not contain a valid string representation of a date and time. This parameter is passed uninitialized. Converts the specified char span of a date and time to its equivalent and returns a value that indicates whether the conversion succeeded. - if the parameter was converted successfully; otherwise, . + if was converted successfully; otherwise, . To be added. + The length of is 1, and it is not one of the format specifier characters defined for . + + -or- + + does not contain a valid custom format pattern. + + is not a valid value. + + -or- + + contains an invalid combination of values (for example, both and ). @@ -10129,6 +10151,11 @@ The following example illustrates the + The length of is 1, and it is not one of the format specifier characters defined for . + + -or- + + does not contain a valid custom format pattern. is not a valid value. @@ -10269,6 +10296,11 @@ The following example illustrates the + The length of is 1, and it is not one of the format specifier characters defined for . + + -or- + + does not contain a valid custom format pattern. is not a valid value. From d72e7209beb50e82a0886bb22db9170cf5d7b4cb Mon Sep 17 00:00:00 2001 From: Henrique Feliciano de Azevedo Date: Wed, 25 Jun 2025 17:47:32 -0300 Subject: [PATCH 2/2] Fix incorrect exception text for DateTime.TryParseExact format arrays --- xml/System/DateTime.xml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/xml/System/DateTime.xml b/xml/System/DateTime.xml index 37c888ff29b..c12af809ab0 100644 --- a/xml/System/DateTime.xml +++ b/xml/System/DateTime.xml @@ -10012,11 +10012,7 @@ The following example illustrates the if was converted successfully; otherwise, . To be added. - The length of is 1, and it is not one of the format specifier characters defined for . - - -or- - - does not contain a valid custom format pattern. + The length of an element in is 1, and it is not one of the format specifier characters defined for . is not a valid value. @@ -10296,11 +10292,7 @@ The following example illustrates the - The length of is 1, and it is not one of the format specifier characters defined for . - - -or- - - does not contain a valid custom format pattern. + The length of an element in is 1, and it is not one of the format specifier characters defined for . is not a valid value.