Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xml/System/DateTime.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5606,7 +5606,7 @@ juillet 2009

<a name="StringToParse"></a>
### The string to parse
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 <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. When using overloads that accept an <xref:System.IFormatProvider> object, it will be used to parse `StringToParse`. If no such object is provided, <xref:System.Globalization.CultureInfo.CurrentCulture> will be used instead.

> [!IMPORTANT]
> 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.
Expand Down
Loading