DateTimeExtensions
.
.
::
.
.
ToDateTime Method
To the date time. var dt = TextBox1.Text.ToDateTime(); if (dt == null) { throw new Exception("Your datetime was invalid"); }
Namespace:
Core
Assembly:
Core
(in Core.dll)
Syntax
C#
public
static
Nullable
<
DateTime
>
ToDateTime
(
string
s
)
Parameters
s
Type:
String
The s.
Return Value
returns DateTime
See Also
DateTimeExtensions Class
Core Namespace