EssentialsDate.TryParse method

Version 1.1.28
.NET Framework 4.8
Namespace Skybrud.Essentials.Time
Assembly Skybrud.Essentials.dll

TryParse(string, out EssentialsDate)

Static

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.

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)

Static

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.

A bitwise combination of enumeration values that indicates the permitted format of input.

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.