Skip to content

Commit f6061ff

Browse files
timheuereerhardt
andauthored
Update xml/System/DateTime.xml
Single-spacing after period Co-authored-by: Eric Erhardt <[email protected]>
1 parent 1def2ee commit f6061ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xml/System/DateTime.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5091,7 +5091,7 @@ juillet 2009
50915091

50925092
<a name="StringToParse"></a>
50935093
### The string to parse
5094-
The <xref:System.DateTime.Parse%2A> method tries to convert the string representation of a date and time value to its <xref:System.DateTime> equivalent. It tries to parse the input string completely without throwing a <xref:System.FormatException> exception. The string is parsed using formatting information in the current <xref:System.Globalization.DateTimeFormatInfo> object, which is supplied implicitly by the current thread culture.
5094+
The <xref:System.DateTime.Parse%2A> method tries to convert the string representation of a date and time value to its <xref:System.DateTime> equivalent. It tries to parse the input string completely without throwing a <xref:System.FormatException> exception. The string is parsed using formatting information in the current <xref:System.Globalization.DateTimeFormatInfo> object, which is supplied implicitly by the current thread culture.
50955095

50965096
> [!IMPORTANT]
50975097
> If the parsing operation fails because of an unrecognized string format, the <xref:System.DateTime.Parse%2A> method throws a <xref:System.FormatException>, whereas the <xref:System.DateTime.TryParse%2A> method returns `false`. Because exception handling can be expensive, you should use <xref:System.DateTime.Parse%2A> when the parsing operation is expected to succeed because the input source is trusted. <xref:System.DateTime.TryParse%2A> 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.

0 commit comments

Comments
 (0)