C#/XAML for HTML5 Documentation
C#/XAML for HTML5 Documentation
Reference
System
DateTime Structure
DateTime Methods
Parse Method
Parse Method (String)
Parse Method (String, IFormatProvider)
Parse Method (String, IFormatProvider, DateTimeStyles)
DateTime
Parse Method (String)
Converts the specified string representation of a date and time to its
DateTime
equivalent.
Namespace:
System
Assembly:
mscorlib (in mscorlib.dll) Version: 4.0.0.0
Syntax
C#
Copy
public
static
DateTime
Parse
(
string
s
)
Parameters
s
Type:
System
String
A string containing a date and time to convert.
Return Value
Type:
DateTime
An object that is equivalent to the date and time contained in
s
.
Exceptions
Exception
Condition
ArgumentNullException
s
is null.
FormatException
s
does not contain a valid string representation of a date and time.
See Also
Reference
DateTime Structure
Parse Overload
System Namespace