From 1def2ee326d3eb28cf1750c18dbe8c16902dd6c7 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Mon, 25 Oct 2021 19:30:01 -0700 Subject: [PATCH 1/2] Update StringToParse section The information relating to the `DateTimeFormatInfo` object is important enough to call out earlier here in the docs...some of this information is later referenced only when referring to ParseExact, but this small addition is helpful to immediately note that the full DateTimeFormatInfo object is used as the default parsing, which would include formatting patterns. --- xml/System/DateTime.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/DateTime.xml b/xml/System/DateTime.xml index c428a4428a5..22278eb7812 100644 --- a/xml/System/DateTime.xml +++ b/xml/System/DateTime.xml @@ -5091,7 +5091,7 @@ juillet 2009 ### The string to parse - The method tries to convert the string representation of a date and time value to its equivalent. It tries to parse the input string completely without throwing a exception. + The method tries to convert the string representation of a date and time value to its equivalent. It tries to parse the input string completely without throwing a exception. The string is parsed using formatting information in the current object, which is supplied implicitly by the current thread culture. > [!IMPORTANT] > If the parsing operation fails because of an unrecognized string format, the method throws a , whereas the method returns `false`. Because exception handling can be expensive, you should use when the parsing operation is expected to succeed because the input source is trusted. is preferable when parsing failures are likely, particularly because an input source is not trusted, or you have reasonable default values to substitute for strings that do not parse successfully. From f6061ff18d42c9733ee49aaf30bc0fc5153f49b2 Mon Sep 17 00:00:00 2001 From: Tim Heuer Date: Wed, 27 Oct 2021 16:29:02 -0700 Subject: [PATCH 2/2] Update xml/System/DateTime.xml Single-spacing after period Co-authored-by: Eric Erhardt --- xml/System/DateTime.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xml/System/DateTime.xml b/xml/System/DateTime.xml index 22278eb7812..4961a23e159 100644 --- a/xml/System/DateTime.xml +++ b/xml/System/DateTime.xml @@ -5091,7 +5091,7 @@ juillet 2009 ### The string to parse - The method tries to convert the string representation of a date and time value to its equivalent. It tries to parse the input string completely without throwing a exception. The string is parsed using formatting information in the current object, which is supplied implicitly by the current thread culture. + The method tries to convert the string representation of a date and time value to its equivalent. It tries to parse the input string completely without throwing a exception. The string is parsed using formatting information in the current object, which is supplied implicitly by the current thread culture. > [!IMPORTANT] > If the parsing operation fails because of an unrecognized string format, the method throws a , whereas the method returns `false`. Because exception handling can be expensive, you should use when the parsing operation is expected to succeed because the input source is trusted. is preferable when parsing failures are likely, particularly because an input source is not trusted, or you have reasonable default values to substitute for strings that do not parse successfully.