EssentialsDate.TryParse method
Namespace | Skybrud.Essentials.Time |
---|---|
Assembly | Skybrud.Essentials.dll |
TryParse(string, out EssentialsDate)
Tries to convert a specified string representation of a date to its EssentialsTime equivalent, and returns a value that indicates whether the conversion succeeded.
public static bool TryParse(string input, EssentialsDate result)
Parameters
input
String
A string that contains a date to convert.
result
EssentialsDate
When the method returns, contains the EssentialsDate value equivalent to
the date, if the conversion succeeded, or null
, if the conversion failed. The conversion fails if
the input parameter is null
or does not contain a valid string representation of a date. This
parameter is passed uninitialized.
Returns
true
if the input parameter is successfully converted; otherwise, false
.
TryParse(string, IFormatProvider, DateTimeStyles, out EssentialsDate)
Tries to convert a specified string representation of a date to its EssentialsTime equivalent, and returns a value that indicates whether the conversion succeeded.
public static bool TryParse(string input, IFormatProvider provider, DateTimeStyles styles, EssentialsDate result)
Parameters
input
String
A string that contains a date to convert.
provider
IFormatProvider
An object that provides culture-specific formatting information about input.
styles
DateTimeStyles
A bitwise combination of enumeration values that indicates the permitted format of input.
result
EssentialsDate
When the method returns, contains the EssentialsDate value equivalent to
the date, if the conversion succeeded, or null
, if the conversion failed. The conversion fails if
the input parameter is null
or does not contain a valid string representation of a date. This
parameter is passed uninitialized.
Returns
true
if the input parameter is successfully converted; otherwise, false
.